Fix E2E tests: Chromium-only CI, reliable demo mode entry#9
Merged
nsheaps merged 5 commits intoclaude/continue-work-yBYfQfrom Mar 5, 2026
Merged
Fix E2E tests: Chromium-only CI, reliable demo mode entry#9nsheaps merged 5 commits intoclaude/continue-work-yBYfQfrom
nsheaps merged 5 commits intoclaude/continue-work-yBYfQfrom
Conversation
Contributor
Preview DeploymentThe web app for this PR has been deployed: Use this to verify the app works correctly, especially for dependency updates. |
Three categories of failures:
1. Playwright config ran 5 browser projects (Chrome, Firefox, Safari,
Mobile Safari, Tablet) but CI only installs Chromium. Restrict to
Desktop Chrome + Mobile Chrome in CI; keep all 5 locally. Add 1
retry in CI for flaky tests.
2. responsive.spec.ts used `getByText('Try the demo')` with an
`if (isVisible())` guard that raced against page load — if the
landing page hadn't rendered yet, the click was skipped and
`.cept-editor` never appeared. Replace with a reliable helper that
waits for the landing page, then clicks via `getByTestId('try-demo')`.
3. slash-commands.spec.ts `openDemoEditor` set localStorage to trigger
demo mode via settings migration, which is fragile. Replace with
the same click-the-button approach that the passing smoke tests use.
Also fix smoke tests for Mobile Chrome where the sidebar can cover the
editor on narrow viewports, and relax deep-linking assertions.
https://claude.ai/code/session_01MZtTcHgcL6CAimGwxEwQV9
The E2E job was gated to only run on main or non-draft PRs, which prevented validating E2E fixes on feature branches. Remove the gate so E2E tests run on every push and PR event. https://claude.ai/code/session_01MZtTcHgcL6CAimGwxEwQV9
- On narrow viewports (<768px) the sidebar is position:fixed and covers
the editor. After entering demo mode, close the sidebar so the
`.cept-editor` assertion passes.
- Fix smoke test: use `landing-page not.toBeVisible` instead of the
broken `.or().first()` chain (expect() doesn't have .first()).
- Fix "loads demo content" test: check for blockquote/callout since the
demo content uses standard `>` blockquotes, not cept callout blocks.
- Fix search test: type "Search" to filter command palette instead of
clicking a potentially unclickable `getByText('Search')` match.
- Fix deep linking test: use `getByTestId` for sidebar navigation.
- Open sidebar before tests that need it (App Menu, Sidebar Actions,
demo page navigation) on mobile viewports.
https://claude.ai/code/session_01MZtTcHgcL6CAimGwxEwQV9
On mobile viewports (<768px), the sidebar opens by default with a fixed backdrop (z-index 40) that covers the entire screen, preventing clicks on landing page buttons. Added closeSidebarOnMobile() helper to all three test files that dismisses the sidebar before interacting with the landing page. https://claude.ai/code/session_01MZtTcHgcL6CAimGwxEwQV9
The sidebar (z-index 50) covers the header toggle button on mobile, making toggle.click() fail with "intercepts pointer events". Fixed by clicking the sidebar backdrop (z-index 40) to the right of the 260px sidebar instead. https://claude.ai/code/session_01MZtTcHgcL6CAimGwxEwQV9
1ac4f20 to
e3cc2e5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
responsive.spec.tsdemo entry: replace racygetByText+isVisible()guard with reliablegetByTestId('try-demo')after waiting for the landing pageslash-commands.spec.tsopenDemoEditor: replace fragile localStorage settings migration with direct button click (matching the passing smoke tests)Test plan
https://claude.ai/code/session_01MZtTcHgcL6CAimGwxEwQV9