From 30cf6a80f1dd4ecc49804563a0400f45203c75c2 Mon Sep 17 00:00:00 2001 From: gadgethd <111318106+gadgethd@users.noreply.github.com> Date: Sat, 19 Sep 2026 12:57:03 +0000 Subject: [PATCH] test(e2e): restore mobile menu handling in dashboard spec The pile edit removed the dashboard-mobile Close menu / Layers steps; the mobile menu still covers the map mode buttons, so both mobile tests timed out on pointer-interception. Reverted to the last-green spec. --- frontend/test/e2e/dashboard.spec.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/test/e2e/dashboard.spec.ts b/frontend/test/e2e/dashboard.spec.ts index 8f7ad19..e906755 100644 --- a/frontend/test/e2e/dashboard.spec.ts +++ b/frontend/test/e2e/dashboard.spec.ts @@ -160,6 +160,9 @@ test('HopReach tiles arrive progressively while the 4,600-node map remains inter { timeout: 15_000 }, ).toBe(true); await expect(page.getByRole('button', { name: 'Precision' })).toBeVisible({ timeout: 8_000 }); + if (testInfo.project.name === 'dashboard-mobile') { + await page.getByRole('button', { name: 'Close menu' }).click(); + } await page.getByRole('button', { name: 'Precision' }).click(); await expect(page.getByRole('button', { name: 'Precision' })).toHaveAttribute('aria-pressed', 'true'); await expect.poll( @@ -208,7 +211,7 @@ test('RF coverage remains available with 3D terrain', async ({ page }, testInfo) await expect(page).toHaveURL(/layers=[^&]*terrain[^&]*coverage/); }); -test('map modes update layers and produce a shareable URL', async ({ page }) => { +test('map modes update layers and produce a shareable URL', async ({ page }, testInfo) => { await page.goto('/'); await expect(page.getByText('Live Map', { exact: true })).toBeVisible({ timeout: 15_000 }); const mapArea = page.locator('.map-area'); @@ -219,6 +222,9 @@ test('map modes update layers and produce a shareable URL', async ({ page }) => .filter((violation) => violation.impact === 'critical' || violation.impact === 'serious') .map((violation) => ({ id: violation.id, targets: violation.nodes.map((node) => node.target.join(' ')) }))).toEqual([]); + if (testInfo.project.name === 'dashboard-mobile') { + await page.getByRole('button', { name: 'Layers' }).first().click(); + } const diagnose = page.getByRole('button', { name: 'Diagnose' }).first(); await diagnose.click(); await expect(diagnose).toHaveAttribute('aria-pressed', 'true'); @@ -227,5 +233,8 @@ test('map modes update layers and produce a shareable URL', async ({ page }) => await expect(page).toHaveURL(/layers=.*clashes/); await page.reload(); + if (testInfo.project.name === 'dashboard-mobile') { + await page.getByRole('button', { name: 'Layers' }).first().click(); + } await expect(page.getByRole('button', { name: 'Diagnose' }).first()).toHaveAttribute('aria-pressed', 'true'); });