1
0

update tests to test nav items

This commit is contained in:
Nicola Clark 2024-10-11 21:25:58 -05:00
parent a24618a873
commit e24b3be94d
Signed by: nicola
GPG Key ID: 3E1710E7FF08956C

View File

@ -11,3 +11,15 @@ test('page has nav tree', async ({ page }) => {
await page.goto('/');
await expect(page.locator('nav')).toBeVisible();
});
test('nav items work', async ({ page }) => {
await page.goto('/');
let lastPane = '#pane-preview';
for (const pane of ['content', 'style', 'preview']) {
const currentPaneId = `pane-${pane}`;
await page.locator(`nav li[aria-controls="${currentPaneId}"]`).click();
await expect(page.locator(`#${currentPaneId}`)).toBeVisible();
await expect(page.locator(lastPane)).toBeHidden();
lastPane = `#${currentPaneId}`;
}
});