mirror of
https://github.com/gadgethd/ukmesh.git
synced 2026-09-09 08:43:45 +00:00
fix RF race test on mobile
This commit is contained in:
@@ -141,7 +141,7 @@ test('HopReach tiles arrive progressively while the 4,600-node map remains inter
|
||||
expect(requests.some((path) => path.startsWith('/api/coverage'))).toBe(false);
|
||||
});
|
||||
|
||||
test('enabled HopReach coverage survives metadata winning the initial map-load race', async ({ page }) => {
|
||||
test('enabled HopReach coverage survives metadata winning the initial map-load race', async ({ page }, testInfo) => {
|
||||
const tileRequests: string[] = [];
|
||||
page.on('request', (request) => {
|
||||
const path = new URL(request.url()).pathname;
|
||||
@@ -155,6 +155,9 @@ test('enabled HopReach coverage survives metadata winning the initial map-load r
|
||||
await page.goto('/', { waitUntil: 'domcontentloaded' });
|
||||
|
||||
await page.getByText('Live Map', { exact: true }).waitFor({ state: 'visible', timeout: 15_000 });
|
||||
if (testInfo.project.name === 'dashboard-mobile') {
|
||||
await page.getByRole('button', { name: 'Layers' }).first().click();
|
||||
}
|
||||
await expect(page.getByRole('button', { name: 'RF Coverage' }).first()).toHaveAttribute('aria-pressed', 'true');
|
||||
await expect.poll(() => tileRequests.length, { timeout: 15_000 }).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user