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
Open
Fix and wire up the Playwright-Electron setup-wizard e2e suite#39Miyamura80 wants to merge 2 commits into
Miyamura80 wants to merge 2 commits into
Conversation
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 reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
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
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
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
e2e/fixtures.tssetEDISON_TEST_MODE=1, an env var nothing in the codebase reads. The switch the app actually checks isEDISON_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.setup-wizard.spec.tsassertedtext=Sign Infor 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, initialview === "select").Changes
e2e/fixtures.tsEDISON_TEST_MODE→EDISON_DRY_RUN; launch Electron with--no-sandbox --disable-gpuso it runs headless under Xvfbe2e/setup-wizard.spec.ts"Welcome"step label; click"Continue with Email"before asserting the email form.github/workflows/e2e.ymlnpm ci→playwright install-deps chromium→npm run build→xvfb-run -a npm run test:e2eValidation
Run locally with the exact CI command (
xvfb-run -a npm run test:e2e) against a real build:Up from 6/8. Electron is a GUI process, so the workflow gives it a virtual X server via
xvfb-run;EDISON_DRY_RUN=1keeps the stdiod/detectord daemons from spawning so the app boots straight to the wizard.🤖 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
EDISON_DRY_RUNinstead of the unusedEDISON_TEST_MODEto prevent daemon spawning during tests.--no-sandboxand--disable-gpufor headless runs under Xvfb.New Features
.github/workflows/e2e.ymlto build the app and runnpm run test:e2eviaxvfb-run -a.npx playwright install-deps chromium.playwright-report/andtest-results/as CI artifacts.Written for commit d52e0f6. Summary will update on new commits.