From 87ae47c0751b10bf481165d0c47110f451b3d244 Mon Sep 17 00:00:00 2001 From: Thomas Kosiewski Date: Mon, 15 Jun 2026 08:35:04 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20tests:=20disable=20tutorials=20i?= =?UTF-8?q?n=20e2e=20harness?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root cause: the e2e fixture only marked the pre-existing tutorial sequences completed, so the review tutorial still started 500ms after ReviewControls mounted. On slower Linux CI runs, its backdrop covered the sortable tab strip and Playwright timed out clicking the Stats tab in reviewRefresh.spec.ts. Fix: persist a fully disabled tutorial state for e2e windows before React mounts, and add a reviewRefresh regression assertion that waits past the tutorial timer and verifies no backdrop appears before switching tabs. Validation: bun test src/browser/contexts/TutorialContext.test.tsx; make typecheck; make static-check. Local Electron e2e launch is blocked in this workspace by missing X server / xvfb, so CI will run the targeted scenario. --- _Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$unknown`_ --- tests/e2e/electronTest.ts | 9 +++++---- tests/e2e/scenarios/reviewRefresh.spec.ts | 5 +++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/e2e/electronTest.ts b/tests/e2e/electronTest.ts index a2bb07355b..43da1376da 100644 --- a/tests/e2e/electronTest.ts +++ b/tests/e2e/electronTest.ts @@ -373,12 +373,13 @@ export const electronTest = base.extend({ await window.waitForLoadState("domcontentloaded"); await window.setViewportSize({ width: 1600, height: 900 }); - // Disable tutorials for e2e tests by marking them as completed - // Must set before React reads the state, so we set and reload + // Disable tutorials for e2e tests before React reads the state, then reload. + // Otherwise delayed tutorial backdrops can race with Playwright clicks and make + // unrelated UI scenarios flaky when a new tutorial sequence is added. await window.evaluate(() => { const tutorialState = { - disabled: false, - completed: { settings: true, creation: true, workspace: true }, + disabled: true, + completed: { creation: true, workspace: true, review: true }, }; localStorage.setItem("tutorialState", JSON.stringify(tutorialState)); }); diff --git a/tests/e2e/scenarios/reviewRefresh.spec.ts b/tests/e2e/scenarios/reviewRefresh.spec.ts index de95b364d4..9eff88f5d3 100644 --- a/tests/e2e/scenarios/reviewRefresh.spec.ts +++ b/tests/e2e/scenarios/reviewRefresh.spec.ts @@ -106,6 +106,11 @@ test.describe("review refresh", () => { const refreshButton = page.getByTestId("review-refresh"); await expect(refreshButton).toBeVisible({ timeout: 10_000 }); + // The review tutorial used to start 500ms after this panel mounted, leaving + // a backdrop over the tab strip and making the Stats tab click time out. + await page.waitForTimeout(600); + await expect(page.getByTestId("tutorial-backdrop")).toHaveCount(0); + // Do a manual refresh await refreshButton.dispatchEvent("click");