fix: E2E member test flake from stale test data and unclosed dialog (#215)#219
Merged
Conversation
…215) Co-authored-by: Ona <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
Author
|
✅ UI verification passed — design spec compliance confirmed. Static analysis: The only UI change ( Visual verification: Screenshots of the Members settings page (desktop 1280×800 and mobile 375×812, dark mode) confirm the member list renders correctly with no layout regressions. |
Collaborator
Author
|
✅ Post-merge verification passed. E2E suite: 57/57 tests passed against Ad-hoc smoke tests:
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 #215
What
The E2E test "owner can re-invite and invited user can accept" fails with a strict mode violation because
locator('text=E2E Member')resolves to 2 elements. The root cause is stale test data from previous runs whoseafterAllcleanup was interrupted (process killed, timeout). A leftover user with display_name "E2E Member" remains as a member of the workspace, so the next run's newly invited user creates a second matching element.A secondary flake in "owner can remove a member" was also fixed: the remove confirmation dialog did not close after clicking "Remove" because
AlertDialogAction(Base UI) is a plain Button that does not auto-close the dialog.How
Stale test data cleanup: Added
cleanupStaleTestUsers()helper that finds profiles by display name and deletes them via the existingdeleteTestUserflow. Called in bothbeforeAll(defensive) andafterAll(fallback wheninvitedUserIdis unset).Dialog close fix: The
MemberListcomponent now controls theAlertDialogopen state viaopenDialogMemberId. After the asynchandleRemovecompletes, the state is set tonull, closing the dialog reliably regardless ofrouter.refresh()timing.Testing
pnpm lint && pnpm typecheck && pnpm testall pass (226 unit tests)npx playwright test e2e/members.spec.ts(7/7)