test: add map animation wait in M7 for marker stability on heavier trip page

This commit is contained in:
2026-06-20 15:16:35 +02:00
parent fb3a656db5
commit 0339529f44
+8
View File
@@ -86,6 +86,14 @@ test('M7: clicking map marker briefly highlights the corresponding entry card',
await expect(page.locator('#trip-map canvas.maplibregl-canvas')).toBeVisible({ timeout: 10000 }); await expect(page.locator('#trip-map canvas.maplibregl-canvas')).toBeVisible({ timeout: 10000 });
await expect(page.locator('.maplibregl-marker').first()).toBeVisible({ timeout: 15000 }); await expect(page.locator('.maplibregl-marker').first()).toBeVisible({ timeout: 15000 });
// Wait for tripMap to finish animating (fitBounds animation completes)
await page.waitForFunction(function () {
return window.tripMap &&
!window.tripMap.isMoving() &&
!window.tripMap.isZooming() &&
!window.tripMap.isRotating();
}, { timeout: 15000 });
// Click the first marker // Click the first marker
await page.locator('.maplibregl-marker').first().click(); await page.locator('.maplibregl-marker').first().click();