From 0b93117bc5250c4d49ee27bd660f0aeef317b77a Mon Sep 17 00:00:00 2001 From: Johan <32440065+ANT1OFF@users.noreply.github.com> Date: Mon, 2 Nov 2026 15:50:19 +0100 Subject: [PATCH] fix(e2e): hold the t-flaky turn while the smoke test reads its opening line The running turn folds its finished steps into one row as soon as the next words start, about half a second after the opening line at the mock's 0.25x speed. smoke.spec.ts is the first spec of its CI shard, so it and its retry open t-flaky in a cold browser, and Playwright's 1 s expect polls often stepped over that window. Hold the script at its existing flaky-read gate, assert the line, then release it. --- apps/web/e2e/smoke.spec.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/web/e2e/smoke.spec.ts b/apps/web/e2e/smoke.spec.ts index c2ffc539..d57f0dfc 100644 --- a/apps/web/e2e/smoke.spec.ts +++ b/apps/web/e2e/smoke.spec.ts @@ -4,10 +4,17 @@ import { threadRow } from "./thread-row"; test("streams a scripted thread, approves a request and sends a queued message", async ({ page, }) => { + // The script holds its turn just after the opening line. Unheld, the line folds into the running + // turn's row as soon as the next words start, about half a second later at the mock's speed: a + // cold browser often missed it between polls. + await page.addInitScript(() => { + window.gramMockHoldGates = true; + }); await page.goto("/t/t-flaky"); const transcript = page.getByTestId("transcript"); await expect(transcript.getByText("I'll start by reading the test")).toBeVisible(); + await page.evaluate(() => window.gramMock?.release("flaky-read")); const composer = page.getByLabel("Message", { exact: true }); await composer.fill("also update the changelog");