test: add E2E tests for workspace settings (#225)#232
Merged
Conversation
Co-authored-by: Ona <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
Author
|
✅ UI verification skipped — no UI files changed (only |
Collaborator
Author
|
✅ Post-merge verification skipped — |
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.
Closes #225
What
Adds E2E tests for workspace settings: edit name/slug, delete workspace, and personal workspace protection.
How
Three Playwright tests in
e2e/workspace-settings.spec.ts:Personal workspace cannot be deleted — navigates to settings for the personal workspace, verifies the "cannot be deleted" message is shown and no delete button exists.
Change workspace name and verify sidebar updates — creates a test workspace via admin client, navigates to its settings, changes the name, saves, reloads, and verifies the sidebar workspace switcher reflects the new name.
Delete non-personal workspace with confirmation — creates a test workspace via admin client, navigates to its settings, clicks delete, confirms in the AlertDialog, verifies redirect to the personal workspace, and confirms the deleted workspace no longer appears in the workspace switcher.
Test workspaces are created/cleaned up via the Supabase admin client (bypassing RLS) to avoid a pre-existing issue where the
CreateWorkspaceDialogcomponent's.insert().select().single()chain fails because the SELECT RLS policy requires membership that hasn't been created yet. Tests run serially to avoid workspace slot contention.Testing
pnpm lint✅pnpm typecheck✅pnpm test— 252 tests pass ✅pnpm test:e2e— 71 tests pass (68 existing + 3 new) ✅