test(web): component tests (jsdom+RTL) + run web tests in CI#15
Merged
Conversation
Component tests (jsdom + Testing Library), asserting OUR component behavior with fetch/auth-client/router stubbed at the boundary (not "React renders"): - AuthForm: email+password sign-in calls signIn.email and routes; failure surfaces the server error and does NOT navigate; signup calls signUp.email; passkey button calls signIn.passkey. - Dashboard/DomainCard: register POSTs and renders the card; "already claimed" error renders; edit-in-place PUTs and shows the new destination; remove DELETEs and the card disappears; "Add a passkey" calls addPasskey + confirms. CI: new "Web checks" job runs typecheck + the coverage-gated unit/integration/ component suite against a Postgres service (integration tests hit a real DB). Playwright e2e stays local (browser-heavy). Coverage: components 0% → ~95%; overall web 92.6%. Audited bona fide: breaking the error-surfacing makes the "already claimed" test go red. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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 this PR does
Adds behavior-focused React component tests (jsdom + Testing Library) and runs the web tests in CI.
Component coverage went from 0% (unmeasured) → ~95%; overall web coverage 92.6%.
Tests (assert our behavior, not the framework)
Boundaries (
fetch,auth-client, router) are stubbed; assertions check real component behavior:signIn.emailand routes to/dashboard; a failure surfaces the server error and does not navigate; signup callssignUp.email; the passkey button callssignIn.passkey.addPasskeyand confirms.CI
New Web checks job:
typecheck+ the coverage-gated unit + integration + component suite against a Postgres service container (integration tests hit a real DB). Playwright e2e stays local (browser-heavy). Previously only Go ran in hosted CI.Bona fide (audited)
Mutation-tested: breaking the error-surfacing in
Dashboardmakes the "already claimed" test go red; restored → green.🤖 Generated with Claude Code