docs: plan for authenticated E2E testing with local Supabase#84
Open
docs: plan for authenticated E2E testing with local Supabase#84
Conversation
Detailed plan for enabling E2E tests to authenticate as real users against local Supabase in CI, replacing the current mock-auth-token bypass with proper storageState-based auth fixtures. https://claude.ai/code/session_019zvMDb67aYA7ndSFuLubhg
Incorporate feedback from CI/Infrastructure, Security, Test Architecture, and DX/Codebase Auditor reviews: - Fix production safety guard (localhost:54321 check, not placeholder) - Add RLS Coverage Reality Check section (API routes bypass RLS) - Resolve globalSetup vs setup project (use globalSetup config key) - Add globalTeardown for local dev party cleanup - Replace silent fixture fallback with explicit errors - Switch from *.auth.spec.ts suffix to @auth Playwright tags - Add cross-user rejection test example - Fix display name sync to validate real AuthContext flow - Standardize realtime timeouts (15s) and sync gate pattern - Correct time estimate (~25-35s/shard, not ~7s) - Demote YouTube workflow (edge-runtime excluded in CI) - Elevate multi-user-realtime.spec.ts migration to required - Add local dev setup instructions and recovery procedures - Resolve all open questions into definitive decisions
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
globalSetup+storageStatefixturesKey decisions in the plan
globalSetupconfig key (not a setup project) for auth user creation + browser login@authPlaywright tags for test organization (not*.auth.spec.tssuffix)globalTeardownto clean up test parties on local devmulti-user-realtime.spec.tsmigration is required (not optional)REALTIME_TIMEOUTwith "2 watching" sync gate patternNo code changes
This PR is a planning document only (
docs/plan-authenticated-e2e-testing.md). Implementation will follow in separate PRs.Test plan
globalSetupapproach works with Playwright's sharding model