Skip to content

test(e2e): real-browser SW-health + GitHub round-trip tests#60

Merged
paperhurts merged 1 commit into
mainfrom
test/e2e-sw-health-roundtrip
Jun 19, 2026
Merged

test(e2e): real-browser SW-health + GitHub round-trip tests#60
paperhurts merged 1 commit into
mainfrom
test/e2e-sw-health-roundtrip

Conversation

@paperhurts

Copy link
Copy Markdown
Owner

The tests that would have caught #57 (and the whole 'never ran in a browser' saga).

  • sw-health.spec.ts — loads the unpacked extension, asserts the service worker registered (created the gitmarks:poll alarm). A SW that crashes on load never reaches that line. No creds needed → runnable anywhere.
  • reconcile-roundtrip.spec.ts — true end-to-end against GitHub: adds a native bookmark, completes setup, asserts the live SW writes it to bookmarks.json in the repo. Skips unless e2e/.env.e2e provides a throwaway repo + scoped fine-grained PAT (.env.example documents it; .env* gitignored).

Both verified passing locally against real Chromium + a real GitHub repo (sw-health 0.4s; round-trip 4.2s).

Follow-up: wire the no-creds SW-health test into CI (needs xvfb for headed extension loading) so a dead SW blocks merges.

🤖 Generated with Claude Code

Adds the e2e coverage that would have caught #57 (dead service worker):
- sw-health.spec.ts: loads the unpacked extension and asserts the SW actually
  registered (created the gitmarks:poll alarm). A SW that crashes on load never
  gets that far. No credentials needed.
- reconcile-roundtrip.spec.ts: true end-to-end against GitHub — adds a native
  bookmark, completes setup, asserts the live SW writes it to bookmarks.json in
  the repo. Skips unless e2e/.env.e2e provides a throwaway repo + scoped PAT.

playwright.config loads e2e/.env.e2e (no dotenv dep); .env.example documents the
format; .env* is gitignored. Both tests verified passing locally against a real
Chromium + real GitHub repo.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@paperhurts paperhurts merged commit dac5a81 into main Jun 19, 2026
1 check passed
@paperhurts paperhurts deleted the test/e2e-sw-health-roundtrip branch June 19, 2026 23:07
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.

1 participant