test: add map animation wait in M7 for marker stability on heavier trip page
This commit is contained in:
@@ -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();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user