commit 949edfe0b22e26420fca1b6f4713380756adafba
parent 7c12455751a62e4ca5d1e8e62082060c87634b01
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Tue, 4 Aug 2026 22:48:05 -0400
Retry the refresh-report click in the actionable spec
Same pre-hydration trap the generateReport helper already guards: a click that
lands before React hydrates fires nothing at all — no request, no job, no
error — so the test waits out its timeout on a button press that never
happened. Regenerating a report is idempotent, so retrying costs nothing.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat:
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/editor/e2e/actionable.spec.ts b/editor/e2e/actionable.spec.ts
@@ -162,18 +162,26 @@ test("syncing a channel auto-regenerates its report", async ({ page }) => {
const first = await readJson<{ generatedAt: string }>(TR_SNAPSHOT_REL);
await new Promise((r) => setTimeout(r, 50)); // ensure a distinct ISO timestamp
await page.goto("/actionable");
- await page
+ const refresh = page
.getByRole("button", { name: "refresh report test-transcribe" })
- .first()
- .click();
- // Wait until the snapshot's generatedAt advances.
+ .first();
+ await refresh.waitFor({ state: "visible" });
+ // Retried, and the timeout is generous: a click landing before React hydrates
+ // fires NOTHING — no request, no job, no error — which is the long-standing
+ // flake pattern in this suite. Regenerating a report is idempotent, so an
+ // extra click costs nothing and a missed one costs the whole test.
await expect
.poll(
async () => {
- const cur = await readJson<{ generatedAt: string }>(TR_SNAPSHOT_REL);
- return cur.generatedAt > first.generatedAt;
+ await refresh.click({ timeout: 5_000 }).catch(() => {});
+ for (let i = 0; i < 20; i++) {
+ const cur = await readJson<{ generatedAt: string }>(TR_SNAPSHOT_REL);
+ if (cur.generatedAt > first.generatedAt) return true;
+ await new Promise((r) => setTimeout(r, 250));
+ }
+ return false;
},
- { timeout: 10_000 },
+ { timeout: 60_000, intervals: [0, 0, 0] },
)
.toBe(true);
});