Skip to content

fix(playwright): Fix flaky Teams spec - #27276

Merged
harsh-vador merged 3 commits into
mainfrom
fix-flaky-teams-spec
Apr 12, 2026
Merged

harsh-vador merged 3 commits into
mainfrom
fix-flaky-teams-spec

Conversation

@harsh-vador

@harsh-vador harsh-vador commented Apr 11, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Why

Two independent flakiness issues in Teams.spec.ts when run in parallel:

  1. Join/Leave team PATCH clobber — the "Join team" and "Leave team" steps both used the shared admin page, PATCHing /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

  • Add scopedUserPage fixture — logs in as the scoped user (UUID-unique per worker) instead of the shared admin, so join/leave PATCHes target a unique user record per worker with no clobber risk.
  • Create team as joinable — createTeam(page, true) sets isJoinable: true so the scoped non-admin user sees the join-teams button.
  • Join step: use scopedUserPage with a waitForResponse on the teams API instead of waitForAllLoadersToDisappear, and remove the spurious [data-testid="users"] tab click that was hiding the header join button.
  • Leave step: use scopedUserPage with waitForResponse registered before the click (correct race-free pattern).
Screenshot 2026-04-11 at 2 15 31 PM

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 63%
63.92% (59755/93475) 43.65% (31229/71542) 46.77% (9394/20085)

@github-actions

github-actions Bot commented Apr 11, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (25 flaky)

✅ 3600 passed · ❌ 0 failed · 🟡 25 flaky · ⏭️ 207 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 454 0 3 2
🟡 Shard 2 640 0 3 32
🟡 Shard 3 646 0 4 26
🟡 Shard 4 623 0 4 47
🟡 Shard 5 606 0 3 67
🟡 Shard 6 631 0 8 33
🟡 25 flaky test(s) (passed on retry)
  • Features/DataAssetRulesDisabled.spec.ts › Verify the Table entity item action after rules disabled (shard 1, 1 retry)
  • Features/CustomizeDetailPage.spec.ts › Table - customization should work (shard 1, 1 retry)
  • Pages/UserCreationWithPersona.spec.ts › Create user with persona and verify on profile (shard 1, 1 retry)
  • Features/BulkEditEntity.spec.ts › Glossary (shard 2, 1 retry)
  • Features/ChangeSummaryBadge.spec.ts › Automated badge should appear on entity description with Automated source (shard 2, 1 retry)
  • Features/DataQuality/BundleSuiteBulkOperations.spec.ts › Bulk selection operations (shard 2, 1 retry)
  • Features/Permissions/GlossaryPermissions.spec.ts › Team-based permissions work correctly (shard 3, 1 retry)
  • Flow/ExploreDiscovery.spec.ts › Should display deleted assets when showDeleted is checked and deleted is not present in queryFilter (shard 3, 1 retry)
  • Flow/PersonaDeletionUserProfile.spec.ts › User profile loads correctly before and after persona deletion (shard 3, 1 retry)
  • Flow/SchemaTable.spec.ts › schema table test (shard 3, 1 retry)
  • Pages/Customproperties-part2.spec.ts › entityReferenceList shows item count, scrollable list, no expand toggle (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Rename domain with assets (tables, topics, dashboards) preserves associations (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Rename domain with owners and experts preserves assignments (shard 4, 1 retry)
  • Pages/Entity.spec.ts › Glossary Term Add, Update and Remove for child entities (shard 4, 1 retry)
  • Pages/EntityDataSteward.spec.ts › Glossary Term Add, Update and Remove (shard 5, 1 retry)
  • Pages/ExploreTree.spec.ts › Verify Database and Database Schema available in explore tree (shard 5, 1 retry)
  • Pages/Glossary.spec.ts › Add and Remove Assets (shard 5, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › verify create lineage for entity - Container (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: searchIndex (shard 6, 1 retry)
  • Pages/Lineage/PlatformLineage.spec.ts › Verify domain platform view (shard 6, 1 retry)
  • Pages/ODCSImportExport.spec.ts › Import ODCS with mustBeBetween quality rules (shard 6, 1 retry)
  • Pages/ProfilerConfigurationPage.spec.ts › Non admin user (shard 6, 1 retry)
  • Pages/Users.spec.ts › Create and Delete user (shard 6, 1 retry)
  • Pages/Users.spec.ts › Permissions for table details page for Data Consumer (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@gitar-bot

gitar-bot Bot commented Apr 11, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

Eliminates flaky behavior in the Teams spec by fixing the join/leave test flow and removing problematic afterAll cleanup. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud

Copy link
Copy Markdown

@harsh-vador harsh-vador changed the title fix(playwright): Fix flaky Teams spec join/leave and remove afterAll cleanup fix(playwright): Fix flaky Teams spec Apr 12, 2026
@harsh-vador
harsh-vador merged commit a960eeb into main Apr 12, 2026
52 of 53 checks passed
@harsh-vador
harsh-vador deleted the fix-flaky-teams-spec branch April 12, 2026 12:32

This branch was previously deployed

1 inactive deployment
test — 6456c89a Deployed Apr 12, 2026 by harsh-vador via playwright-ci-postgresql (5, 6) #41550
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants