Merge pull request #436 from trails-cool/fix/e2e-planner-coloring-flake

test(e2e/planner-coloring): bump canvas timeout 10s→20s to absorb cold-CI lazy load
This commit is contained in:
Ullrich Schäfer 2026-05-25 23:48:38 +02:00 committed by GitHub
commit e647a29633
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,6 +11,15 @@ const WITH_ROUTE = encodeURIComponent(JSON.stringify([
{ lat: 52.515, lon: 13.351 },
]));
// `ElevationChart` returns `null` until `points.length >= 2` — i.e. until
// the BRouter response (even mocked) has flowed through the Yjs round-trip
// and updated `yjs.routeData`. On cold CI runs the lazy-loaded chart
// chunk + that async pipeline have measurably exceeded the previous 10s
// window. 20s buys headroom without masking a real regression — the
// other planner suites use the same budget for similar lazy-chunk waits.
const CANVAS_TIMEOUT = 20_000;
const SELECT_TIMEOUT = 5_000;
test.describe("Planner route coloring", () => {
test("session has color mode toggle", async ({ page, request }) => {
const url = await createSession(request);
@ -19,9 +28,9 @@ test.describe("Planner route coloring", () => {
await expect(page.locator(".leaflet-container")).toBeVisible({ timeout: 10000 });
await expect(page.getByText("Connected")).toBeVisible({ timeout: 15000 });
await expect(page.locator("canvas")).toBeVisible({ timeout: 10000 });
await expect(page.locator("canvas")).toBeVisible({ timeout: CANVAS_TIMEOUT });
const select = page.locator("select", { has: page.locator("option[value='highway']") });
await expect(select).toBeVisible({ timeout: 5000 });
await expect(select).toBeVisible({ timeout: SELECT_TIMEOUT });
await expect(select).toHaveValue("plain");
await select.selectOption("elevation");
@ -35,9 +44,9 @@ test.describe("Planner route coloring", () => {
await expect(page.locator(".leaflet-container")).toBeVisible({ timeout: 10000 });
await expect(page.getByText("Connected")).toBeVisible({ timeout: 15000 });
await expect(page.locator("canvas")).toBeVisible({ timeout: 10000 });
await expect(page.locator("canvas")).toBeVisible({ timeout: CANVAS_TIMEOUT });
const select = page.locator("select", { has: page.locator("option[value='highway']") });
await expect(select).toBeVisible({ timeout: 5000 });
await expect(select).toBeVisible({ timeout: SELECT_TIMEOUT });
await select.selectOption("highway");
await expect(select).toHaveValue("highway");
@ -54,9 +63,9 @@ test.describe("Planner route coloring", () => {
await expect(page.locator(".leaflet-container")).toBeVisible({ timeout: 10000 });
await expect(page.getByText("Connected")).toBeVisible({ timeout: 15000 });
await expect(page.locator("canvas")).toBeVisible({ timeout: 10000 });
await expect(page.locator("canvas")).toBeVisible({ timeout: CANVAS_TIMEOUT });
const select = page.locator("select", { has: page.locator("option[value='highway']") });
await expect(select).toBeVisible({ timeout: 5000 });
await expect(select).toBeVisible({ timeout: SELECT_TIMEOUT });
await select.selectOption("highway");
const canvas = page.locator("canvas");