feat(maps): start new installations with MapLibre Liberty

This commit is contained in:
Maurice
2026-11-30 16:24:50 +01:00
parent f814b0000d
commit 5c133bbf40
10 changed files with 127 additions and 13 deletions
+3 -3
View File
@@ -31,7 +31,7 @@ test('#1432 iPad: the places list scrolls under a swipe', async ({ page }) => {
await page.getByText(title).first().click()
await expect(page).toHaveURL(/\/trips\/\d+/)
await expect(page.locator('.leaflet-container')).toBeVisible({ timeout: 20_000 })
await expect(page.locator('.leaflet-container, .maplibregl-canvas, .mapboxgl-canvas').first()).toBeVisible({ timeout: 20_000 })
const tripId = page.url().match(/\/trips\/(\d+)/)![1]
@@ -43,7 +43,7 @@ test('#1432 iPad: the places list scrolls under a swipe', async ({ page }) => {
expect(res.ok(), `seed place ${i}`).toBeTruthy()
}
await page.reload()
await expect(page.locator('.leaflet-container')).toBeVisible({ timeout: 20_000 })
await expect(page.locator('.leaflet-container, .maplibregl-canvas, .mapboxgl-canvas').first()).toBeVisible({ timeout: 20_000 })
// An iPad is inside the 768-1023px band, where only one side panel is open at a
// time so the map keeps a usable width (#2247). The places list is one tap away.
@@ -88,7 +88,7 @@ test('#1432 iPad: the places list scrolls under a swipe', async ({ page }) => {
// 3. The iPad must still get the desktop shell — isMobile stayed width-based. One
// panel at a time (#2247), so opening Places closed the day plan and left its
// tab as the way back.
await expect(page.locator('.leaflet-container')).toBeVisible()
await expect(page.locator('.leaflet-container, .maplibregl-canvas, .mapboxgl-canvas').first()).toBeVisible()
// The top tab bar has a button named Plan as well; the way back is the panel's
// own tab, which is accented while its panel is closed.
await expect(page.locator('button[aria-label="Plan"].bg-accent')).toBeVisible()
+2 -2
View File
@@ -22,7 +22,7 @@ test('desktop: reorder arrows are hidden-and-inert until the row is hovered', as
await page.getByText(title).first().click()
await expect(page).toHaveURL(/\/trips\/\d+/)
await expect(page.locator('.leaflet-container')).toBeVisible({ timeout: 20_000 })
await expect(page.locator('.leaflet-container, .maplibregl-canvas, .mapboxgl-canvas').first()).toBeVisible({ timeout: 20_000 })
// Two places on day 1, so the day plan renders rows carrying reorder arrows.
const tripId = page.url().match(/\/trips\/(\d+)/)![1]
@@ -38,7 +38,7 @@ test('desktop: reorder arrows are hidden-and-inert until the row is hovered', as
})
}
await page.reload()
await expect(page.locator('.leaflet-container')).toBeVisible({ timeout: 20_000 })
await expect(page.locator('.leaflet-container, .maplibregl-canvas, .mapboxgl-canvas').first()).toBeVisible({ timeout: 20_000 })
const row = page.locator('.dp-row').filter({ hasText: 'Alpha' }).first()
await expect(row).toBeVisible({ timeout: 20_000 })
+3 -1
View File
@@ -58,7 +58,9 @@ test('desktop: a stay booked in another session shows in the day plan without a
const hotel = `Mercure Hotel ${Date.now()}`;
const { tripId, dayIds } = await seedTrip(page.request, `Stay live ${Date.now()}`);
await openPlanner(page, tripId);
await expect(page.locator('.leaflet-container')).toBeVisible({ timeout: 20_000 });
await expect(page.locator('.leaflet-container, .maplibregl-canvas, .mapboxgl-canvas').first()).toBeVisible({
timeout: 20_000,
});
await bookElsewhere(browser, tripId, dayIds, hotel);
+2 -2
View File
@@ -24,6 +24,6 @@ test('open a trip and land in the planner with a map', async ({ page }) => {
await page.getByText(title).first().click()
await expect(page).toHaveURL(/\/trips\/\d+/)
// The planner shows a Leaflet map once mounted (past the splash screen).
await expect(page.locator('.leaflet-container')).toBeVisible({ timeout: 20_000 })
// The planner shows its configured map once mounted.
await expect(page.locator('.leaflet-container, .maplibregl-canvas, .mapboxgl-canvas').first()).toBeVisible({ timeout: 20_000 })
})