feat: add Playwright e2e suite and run it in CI#5
Merged
Conversation
Ports the ad-hoc playground verification into a real @playwright/test suite (e2e/playground.spec.ts, 8 tests): query rendering/dedup/refresh, command with optimistic .updates() observed deterministically via an exposed pending counter, form validation/success/refresh-all, live query streaming, and a no-page-errors guard. CI installs Chromium and runs the suite after the build; locally PLAYWRIGHT_CHROMIUM_PATH points at a preinstalled browser. Instructions updated in CLAUDE.md, the verify and kit-parity skills, and the README. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EJj9ab3v9HjudgX8L1x821
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
Turns the ad-hoc Playwright verification used in previous PRs into a real, versioned e2e suite that CI runs on every push/PR, catching in-browser regressions that jsdom unit tests can't (real event loop, real DOM/forms, real Svelte reactivity flushing).
Contents
e2e/playground.spec.ts— 8 tests driving the vite playground:refresh()withOverridevisible while the command is pending, then the committed value after the single-flight refresh, surviving a manual refreshresult, clears issues, and the default refresh-all propagates to the query sectionconnectedplaywright.config.ts— starts the vite dev server itself (webServer), retries + GitHub reporter on CI, and honorsPLAYWRIGHT_CHROMIUM_PATHso sandboxed sessions use a preinstalled browser instead of downloading one.addLike.pendingis now rendered (like-pendingtestid) so the optimistic-update test asserts on reactive state transitions (pending: 1→ value visible →pending: 0→ value confirmed) instead of racing timers; the like command is deliberately slow (400ms) to widen the observation window.Install Playwright browser+End-to-end testssteps after the build.verifyskill (step 4 =npm run test:e2e; behavioral changes should extend the playground + suite rather than be verified by hand), thekit-parityskill (step 6 references the suite), README dev section, and the settings allow-list. Also fixed a staleverifyskill reference to the old vitestpoolOptionslocation after the dependency upgrade.Verification
svelte-check0/0, vitest 103/103,svelte-package+publintclean, prettier clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01EJj9ab3v9HjudgX8L1x821
Generated by Claude Code