test(e2e): Playwright smoke test loading the unpacked extension#16
Merged
Conversation
Adds an end-to-end smoke test that launches real Chromium (new headless) with dist/ loaded via --load-extension and asserts the parts of one-click capture that are automatable without the browser toolbar: the extension / service worker loads (no popup, downloads permission), the on-page capture notice shows → hides → is removed (driven through the real content script with SB_CAPTURE_* messages), and the editor page renders. - @playwright/test devDep + `npm run test:e2e` (builds dist, then runs). - playwright.config.ts (testDir tests/e2e); vitest scoped to *.test.ts so it ignores the spec. - gitignore Playwright artifacts; document the command in CLAUDE.md. Deliberately excluded from `npm run check`/CI (needs downloaded browsers + new-headless); run locally after `npx playwright install chromium`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
DCCA
force-pushed
the
test/e2e-extension-smoke
branch
from
June 27, 2026 21:36
61e6de9 to
d0a2c1f
Compare
Owner
Author
Review (independent subagent + applied fixes)Verdict: ship. No blockers. Verified by running the gates: Applied the two worthwhile nits:
Re-ran after the changes: e2e 3/3, typecheck/lint/unit/format all green. |
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.
What
An end-to-end smoke test that launches real Chromium (new headless) with the unpacked
dist/loaded (--load-extension) and exercises the page-side parts of one-click capture that browser automation can drive:default_popupand includes thedownloadspermission.SB_CAPTURE_BEGIN/SB_SET_OVERLAY/SB_CAPTURE_END: shows (display:flex, correct text), hides cleanly (display:none— the leak fix), and is removed from the DOM.Capture PageandCopy for Claude Codebuttons are visible.How it's wired
@playwright/testdevDep +npm run test:e2e(buildsdist/, thenplaywright test).playwright.config.ts(testDir: tests/e2e);vitest.config.tsscopes unit tests totests/**/*.test.tsso vitest ignores the.spec.ts.CLAUDE.md.Deliberately excluded from
npm run checkand CI — it needs downloaded browsers + new-headless. Run locally after a one-timenpx playwright install chromium.Verification
npm run test:e2e→ 3 passed.npm run checkgreen (vitest still 7 unit files, no e2e),npm audit --audit-level=high→ 0 vulnerabilities,format:checkclean.🤖 Generated with Claude Code