mirror of
https://github.com/Zakkaus/doona.git
synced 2026-12-06 08:02:04 +00:00
A collapsed panel, docked or floating, shows the live download and upload rates with their chart colours and direction icons in place of its title. The editor opens with nothing selected. The preview's inline end edge sets the floating panel's width within its limits, by pointer or arrow keys; Save keeps it and Cancel discards it. A docked panel previews at the sidebar's width. The floating panel's list runs into its bottom inset, so the last row ends one inset from the border, as the header starts from the top.
13 lines
672 B
TypeScript
13 lines
672 B
TypeScript
import type {Page} from '@playwright/test';
|
|
import {expect, moreAction} from './fixtures';
|
|
|
|
export const panel = (page: Page) => page.locator('.rp-floating-panel');
|
|
export const editPanel = (page: Page) => moreAction(panel(page), 'Edit widgets', 'Panel options');
|
|
// The editor opens with nothing selected; a click on a preview row selects it and fills the inspector.
|
|
export async function pickWidget(page: Page, index = 0) {
|
|
const row = page.locator('.rp-widget-preview .rp-sortable-row').nth(index);
|
|
await row.click();
|
|
await expect(row).toHaveAttribute('data-selected', 'true');
|
|
await expect(page.locator('.rp-widget-inspector button').first()).toBeVisible();
|
|
}
|