Skip to content
This repository was archived by the owner on Jul 24, 2026. It is now read-only.

Fix and wire up the Playwright-Electron setup-wizard e2e suite#39

Open
Miyamura80 wants to merge 2 commits into
mainfrom
claude/fix-e2e-setup-wizard-harness
Open

Fix and wire up the Playwright-Electron setup-wizard e2e suite#39
Miyamura80 wants to merge 2 commits into
mainfrom
claude/fix-e2e-setup-wizard-harness

Conversation

@Miyamura80

@Miyamura80 Miyamura80 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

The e2e/ Playwright-Electron harness had two bugs that made it fail 2/8 whenever it was run, and no CI ever ran it — so it silently rotted. This fixes the harness and adds a workflow that runs it under Xvfb, turning dead code into a green gate on the setup wizard.

The bugs

  • Dead env var. e2e/fixtures.ts set EDISON_TEST_MODE=1, an env var nothing in the codebase reads. The switch the app actually checks is EDISON_DRY_RUN (src/main/stdiod/controller.ts, src/main/detectord/controller.ts, src/main/stdiod/installRefresh.ts, src/main/infra/setupConfig.ts). Without it, the app tried to spawn native daemons during the test.
  • Wrong assertions. setup-wizard.spec.ts asserted text=Sign In for the step-1 label — but the step indicator label is "Welcome" (StepIndicator.tsx). It also expected the email input to be immediately visible, but the email form is behind the "Continue with Email" provider-select click (WelcomeStep.tsx, initial view === "select").

Changes

File Change
e2e/fixtures.ts EDISON_TEST_MODEEDISON_DRY_RUN; launch Electron with --no-sandbox --disable-gpu so it runs headless under Xvfb
e2e/setup-wizard.spec.ts assert the "Welcome" step label; click "Continue with Email" before asserting the email form
.github/workflows/e2e.yml newnpm ciplaywright install-deps chromiumnpm run buildxvfb-run -a npm run test:e2e

Validation

Run locally with the exact CI command (xvfb-run -a npm run test:e2e) against a real build:

Running 8 tests using 1 worker
  ✓  8 passed (11.1s)

Up from 6/8. Electron is a GUI process, so the workflow gives it a virtual X server via xvfb-run; EDISON_DRY_RUN=1 keeps the stdiod/detectord daemons from spawning so the app boots straight to the wizard.

Note: GitHub-hosted runners download the Electron runtime from GitHub normally, so no mirror is needed in CI.

🤖 Generated with Claude Code


Generated by Claude Code


Summary by cubic

Fixes the Playwright-Electron setup-wizard e2e suite and wires it into CI to run headlessly and gate changes. Adds failure artifacts (HTML report, traces, screenshots) to make failures debuggable.

  • Bug Fixes

    • Use EDISON_DRY_RUN instead of the unused EDISON_TEST_MODE to prevent daemon spawning during tests.
    • Update the spec to assert the "Welcome" step and click "Continue with Email" before checking the email form.
    • Launch Electron with --no-sandbox and --disable-gpu for headless runs under Xvfb.
  • New Features

    • Add .github/workflows/e2e.yml to build the app and run npm run test:e2e via xvfb-run -a.
    • Install runtime deps with npx playwright install-deps chromium.
    • Configure Playwright to keep an HTML report, trace, and screenshots on failure and upload playwright-report/ and test-results/ as CI artifacts.

Written for commit d52e0f6. Summary will update on new commits.

Review in cubic

The e2e harness had two bugs that made it fail 2/8 whenever run, and no CI
ever ran it - so it silently rotted:

- fixtures.ts set EDISON_TEST_MODE=1, an env var nothing reads. The switch the
  app actually checks is EDISON_DRY_RUN (stdiod/detectord/installRefresh
  short-circuits). Without it the app tried to spawn native daemons under test.
- setup-wizard.spec.ts asserted `text=Sign In` for the step-1 label (it's
  "Welcome") and expected the email input to be immediately visible (it's behind
  the "Continue with Email" provider-select click).

Changes:
- fixtures.ts: EDISON_TEST_MODE -> EDISON_DRY_RUN; launch Electron with
  --no-sandbox --disable-gpu so it runs headless under Xvfb.
- setup-wizard.spec.ts: assert the "Welcome" step label; click "Continue with
  Email" before asserting the email form.
- New .github/workflows/e2e.yml: build the app and run the suite under xvfb-run
  so the harness is a green gate instead of dead code.

Verified locally: 8/8 passing under `xvfb-run -a npm run test:e2e`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015grmqjFQGz2cRbY7ghHMCX
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread .github/workflows/e2e.yml
Addresses cubic review on #39: a failed e2e run only emitted the raw log,
with no trace/screenshot/report to inspect.

- playwright.config.ts: add the html reporter and retain trace + screenshot
  on failure (the previous "on-first-retry" trace never fired because
  retries is 0).
- e2e.yml: upload playwright-report/ and test-results/ as an artifact when
  the job fails.

Re-ran locally: still 8/8 under xvfb-run.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015grmqjFQGz2cRbY7ghHMCX
@Miyamura80
Miyamura80 requested a review from IliaMManolov July 19, 2026 21:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants