mirror of
https://github.com/gadgethd/ukmesh.git
synced 2026-10-20 13:02:05 +00:00
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.
This commit is contained in:
@@ -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');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user