diff --git a/tests/ui/maps.spec.js b/tests/ui/maps.spec.js index 48491a5..2e6319f 100644 --- a/tests/ui/maps.spec.js +++ b/tests/ui/maps.spec.js @@ -78,3 +78,17 @@ test('M6: Italy map has a journey MapLibre source after GPX settles', async ({ p expect(hasSource).toBe(true); }); + +// ── M7: Clicking a trip-page map marker adds is-highlighted to the entry card ── +test('M7: clicking map marker briefly highlights the corresponding entry card', async ({ page }) => { + await page.goto('/trips/japan-korea-2026'); + // Wait for map canvas and at least one marker + await expect(page.locator('#trip-map canvas.maplibregl-canvas')).toBeVisible({ timeout: 10000 }); + await expect(page.locator('.maplibregl-marker').first()).toBeVisible({ timeout: 15000 }); + + // Click the first marker + await page.locator('.maplibregl-marker').first().click(); + + // Within 500ms of click + delay, one entry-card should have is-highlighted + await expect(page.locator('.entry-card.is-highlighted')).toBeVisible({ timeout: 1500 }); +}); diff --git a/user b/user index 9365f46..a398bcb 160000 --- a/user +++ b/user @@ -1 +1 @@ -Subproject commit 9365f464405293bf9117f25d32f30ab7cfec1720 +Subproject commit a398bcb737d9da1bc15cc4577e1dc1c870419c85