From 10e113e5372da30ba006c258daa95fe9a2997cd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Tue, 4 Aug 2026 09:26:43 +0200 Subject: [PATCH] Give the add-measurement journey the dashboard's budget, not the default one MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It kept dying at thirty seconds on the quick-add trigger. The trigger was not the problem: the dashboard route segment suspends behind its server render and shows `loading.tsx` until that resolves, and on a shared runner with the whole suite in flight that has overrun the default test budget. Raising the locator timeout achieved nothing, because the test itself was the thing expiring. So the wait is now on the skeleton going away rather than on the network going quiet — `networkidle` says nothing about whether a suspended segment resolved — and the budget belongs to the page rather than to the default. Every assertion about the round trip stays exactly as tight as it was. --- e2e/measurement-flow.spec.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/e2e/measurement-flow.spec.ts b/e2e/measurement-flow.spec.ts index 39e20f7db..11672cf53 100644 --- a/e2e/measurement-flow.spec.ts +++ b/e2e/measurement-flow.spec.ts @@ -16,6 +16,16 @@ import { openMenu } from "./open-menu"; test.describe("add measurement flow", () => { test.use({ storageState: STORAGE_STATE_PATH }); + // This journey lands on the dashboard, which is the most expensive page in + // the product to render cold: the route segment suspends behind the server + // render and shows `loading.tsx` until it resolves. On a shared runner with + // the whole suite in flight that has overrun the 30 s default, and the test + // then died on the quick-add trigger rather than on anything it is about. + // The subject here is the add-then-appears round trip, not the dashboard's + // cold-start latency, so the budget is the page's and the assertions stay + // exactly as tight as they were. + test.setTimeout(90_000); + test("creating a weight reading surfaces it in the list", async ({ page, }) => { @@ -104,6 +114,13 @@ test.describe("add measurement flow", () => { ); await page.goto("/", { waitUntil: "domcontentloaded" }); + // Past the route-level skeleton first. `networkidle` says nothing about + // whether the suspended segment resolved, and every locator below lives + // inside the content that replaces it. + await expect(page.locator('[data-slot="dashboard-loading"]')).toHaveCount( + 0, + { timeout: 60_000 }, + ); await page.waitForLoadState("networkidle"); // Open the "Add" dropdown — the dashboard's quick-entry trigger sits