test(dashboard): inspect compact widget controls in accessibility triage

This commit is contained in:
cesnimda
2026-10-29 09:03:58 +01:00
parent 268559f4ae
commit 994bf8f8bb
2 changed files with 28 additions and 1 deletions
@@ -65,7 +65,18 @@ for (const language of ['en', 'nb'] as const) for (const theme of ['light', 'dar
await scan('drawer-closed-settled');
await page.getByRole('button', { name: t.dashboardCustomize, exact: true }).click();
const editor = page.getByRole('region', { name: t.dashboardEditing, exact: true });
await expect(editor.getByRole('combobox')).toHaveCount(9);
await expect(editor).toBeVisible();
const preview = page.getByRole('region', { name: t.dashboardPreview, exact: true });
const disclosures = preview.locator('[data-dashboard-widget] summary');
await expect(disclosures).toHaveCount(9);
await expect(preview.getByRole('combobox')).toHaveCount(0);
await scan('editor-compact');
for (const disclosure of await disclosures.all()) {
await disclosure.focus();
await disclosure.press('Enter');
}
await expect(preview.getByRole('combobox')).toHaveCount(9);
await expect(preview.getByRole('spinbutton')).toHaveCount(9);
await scan('editor-settled');
await info.attach('phase9-settled-axe', { body: JSON.stringify({ language, theme, badge, drawerAfterEscape, hiddenDrawer, scans,
limits: 'Finite native DOM/keyboard evidence; remaining overlapping background contrast and actual screen-reader perception still require human assessment.' }, null, 2), contentType: 'application/json' });