Skip to content

Fix E2E tests: Chromium-only CI, reliable demo mode entry#9

Merged
nsheaps merged 5 commits intoclaude/continue-work-yBYfQfrom
claude/fix-e2e-tests-eSNab
Mar 5, 2026
Merged

Fix E2E tests: Chromium-only CI, reliable demo mode entry#9
nsheaps merged 5 commits intoclaude/continue-work-yBYfQfrom
claude/fix-e2e-tests-eSNab

Conversation

@nsheaps
Copy link
Copy Markdown
Owner

@nsheaps nsheaps commented Mar 5, 2026

Summary

  • Restrict Playwright projects to Chromium-only in CI (Firefox/Safari/WebKit were never installed but tests tried to run them)
  • Fix responsive.spec.ts demo entry: replace racy getByText + isVisible() guard with reliable getByTestId('try-demo') after waiting for the landing page
  • Fix slash-commands.spec.ts openDemoEditor: replace fragile localStorage settings migration with direct button click (matching the passing smoke tests)
  • Fix smoke tests for Mobile Chrome where sidebar covers the editor
  • Add 1 retry in CI for flaky tests

Test plan

  • CI E2E job passes on this branch
  • All Desktop Chrome tests pass
  • All Mobile Chrome tests pass
  • Screenshot capture still works

https://claude.ai/code/session_01MZtTcHgcL6CAimGwxEwQV9

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2026

Preview Deployment

The web app for this PR has been deployed:

Open Preview

Use this to verify the app works correctly, especially for dependency updates.

github-actions bot added a commit that referenced this pull request Mar 5, 2026
github-actions bot added a commit that referenced this pull request Mar 5, 2026
github-actions bot added a commit that referenced this pull request Mar 5, 2026
github-actions bot added a commit that referenced this pull request Mar 5, 2026
github-actions bot added a commit that referenced this pull request Mar 5, 2026
@nsheaps nsheaps marked this pull request as ready for review March 5, 2026 15:26
@nsheaps nsheaps enabled auto-merge (rebase) March 5, 2026 15:28
@nsheaps nsheaps disabled auto-merge March 5, 2026 15:28
@nsheaps nsheaps changed the base branch from main to claude/continue-work-yBYfQ March 5, 2026 15:29
claude added 5 commits March 5, 2026 10:29
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
@nsheaps nsheaps force-pushed the claude/fix-e2e-tests-eSNab branch from 1ac4f20 to e3cc2e5 Compare March 5, 2026 15:29
github-actions bot added a commit that referenced this pull request Mar 5, 2026
@nsheaps nsheaps merged commit e448463 into claude/continue-work-yBYfQ Mar 5, 2026
2 checks passed
@nsheaps nsheaps deleted the claude/fix-e2e-tests-eSNab branch March 5, 2026 15:31
github-actions bot added a commit that referenced this pull request Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants