Conversation
tests/utils/groups.ts and tests/utils/login.ts hand-built REST/Auth requests via fetch with duplicated ADMIN_HEADERS; converge them onto the typed admin Supabase client, extracted from linkWizardArtist.ts into a shared tests/utils/supabaseAdmin.ts. UPL-36 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S7jKDawjBQighiJvRL7LjZ
Self-review flagged that delegating to addMemberToGroup re-resolved the already-known user id via a second admin API round-trip; insert the membership row directly instead, matching the original fetch-based behavior. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S7jKDawjBQighiJvRL7LjZ
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved review issues were identified.
Pull request overview
Refactors E2E test utilities to use a shared typed Supabase admin client instead of raw REST requests.
Changes:
- Added a shared admin client.
- Migrated login and group helpers to typed Supabase operations.
- Reused the client in link-wizard fixtures.
File summaries
| File | Description |
|---|---|
tests/utils/supabaseAdmin.ts |
Defines the shared typed admin client. |
tests/utils/login.ts |
Uses admin auth and database operations. |
tests/utils/linkWizardArtist.ts |
Reuses the shared client. |
tests/utils/groups.ts |
Uses typed group and membership operations. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Playwright test resultsDetails
|
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.
Converges
tests/utils/groups.tsandtests/utils/login.tsoff rawfetch+ hand-builtADMIN_HEADERSonto the typed admin Supabase client, extracted into a sharedtests/utils/supabaseAdmin.tsthatlinkWizardArtist.tsnow also uses instead of its own separate instance.Error handling goes through the client's
{ data, error }shape, with messages that still name the email/id and operation attempted.UPL-36
Verification
pnpm test(655 tests) passes;pnpm run typecheckandpnpm run lintare clean.tests/e2e/active-group.spec.ts,tests/e2e/onboarding.spec.ts,tests/e2e/voting.spec.ts, and any other spec usingsignInAsAdmin/createGroupWithMember/addMemberToGroupagainst a local Supabase instance — sign-in, group creation, and admin-role grants still succeed exactly as before.-x realtimeexclusion), so the e2e specs above weren't run live here — the swap was verified type-by-type againstsrc/integrations/supabase/types.tsand cross-checked against the existinglinkWizardArtist.tsusage of the same client instead.🤖 Generated with Claude Code
https://claude.ai/code/session_01S7jKDawjBQighiJvRL7LjZ
Generated by Claude Code