From 0339529f44ac8711135dc01b310a75db3f7af8cc Mon Sep 17 00:00:00 2001 From: Mischa Date: Sat, 20 Jun 2026 15:16:35 +0200 Subject: [PATCH] test: add map animation wait in M7 for marker stability on heavier trip page --- tests/ui/maps.spec.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/ui/maps.spec.js b/tests/ui/maps.spec.js index accfb25..4425690 100644 --- a/tests/ui/maps.spec.js +++ b/tests/ui/maps.spec.js @@ -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('.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 await page.locator('.maplibregl-marker').first().click();