Files
doona/e2e/widget-helpers.ts
T
Zakk 27d4e9bcf9 fix(widgets): rates in the collapsed header, preview width edge, even insets
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.
2026-10-03 15:35:51 +10:00

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();
}