diff --git a/tests/ui/maps.spec.js b/tests/ui/maps.spec.js index 219343c..638b5f9 100644 --- a/tests/ui/maps.spec.js +++ b/tests/ui/maps.spec.js @@ -17,7 +17,8 @@ test('M1: /map page renders MapLibre GL canvas without JS errors', async ({ page test('M2: /map page has at least one dot marker', async ({ page }) => { await page.goto('/trips/japan-korea-2026/map'); await expect(page.locator('canvas.maplibregl-canvas')).toBeVisible({ timeout: 10000 }); - // Custom DOM markers are rendered as .maplibregl-marker elements + // Markers are added in map.on('load') — wait for first to appear in the DOM + await expect(page.locator('.maplibregl-marker').first()).toBeVisible({ timeout: 15000 }); const markerCount = await page.locator('.maplibregl-marker').count(); expect(markerCount, 'At least one marker present').toBeGreaterThan(0); });