Repository navigation
fix(playwright): Fix flaky Teams spec - #27276
Merged
Merged
Conversation
Contributor
Contributor
🟡 Playwright Results — all passed (25 flaky)✅ 3600 passed · ❌ 0 failed · 🟡 25 flaky · ⏭️ 207 skipped
🟡 25 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Code Review ✅ ApprovedEliminates flaky behavior in the Teams spec by fixing the join/leave test flow and removing problematic afterAll cleanup. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|
ShaileshParmar11
approved these changes
Apr 12, 2026
6 of 8 tasks
This branch was previously deployed
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.



Describe your changes:
Why
Two independent flakiness issues in
Teams.spec.tswhen run in parallel:/api/v1/users/{adminId}. Because the admin user is shared across all parallel workers, concurrent PATCH requests (read-modify-write) clobbered each other: one worker's leave was undone by another worker's stale read, so[data-testid="join-teams"]never appeared after leaving.What
scopedUserPagefixture — logs in as the scopeduser(UUID-unique per worker) instead of the shared admin, so join/leave PATCHes target a unique user record per worker with no clobber risk.createTeam(page, true)setsisJoinable: trueso the scoped non-admin user sees thejoin-teamsbutton.scopedUserPagewith awaitForResponseon the teams API instead ofwaitForAllLoadersToDisappear, and remove the spurious[data-testid="users"]tab click that was hiding the header join button.scopedUserPagewithwaitForResponseregistered before the click (correct race-free pattern).Type of change:
Checklist:
Fixes <issue-number>: <short explanation>