Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions tests/e2e/electronTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,13 @@ export const electronTest = base.extend<ElectronFixtures>({
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));
});
Expand Down
5 changes: 5 additions & 0 deletions tests/e2e/scenarios/reviewRefresh.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
Loading