Skip to content

Fix flaky test cases for user role and level update in users list#7042

Merged
nischalstha9 merged 5 commits intodevelopfrom
fix/test-case-flikyness
Nov 12, 2025
Merged

Fix flaky test cases for user role and level update in users list#7042
nischalstha9 merged 5 commits intodevelopfrom
fix/test-case-flikyness

Conversation

@suzit-10
Copy link
Copy Markdown
Contributor

@suzit-10 suzit-10 commented Sep 24, 2025

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation
  • 🧑‍💻 Refactor
  • ✅ Test
  • 🤖 Build or CI
  • ❓ Other (please specify)

Describe this PR

This PR addresses the flakiness in the UsersList and teams edit test cases.
The root cause was the inconsistent rendering of the pop-up triggered by the table rows due to asynchronous TanStack Table rendering and team edit form details.

Changes made:

  • Ensured test setup waits for loading animation to disappear and rows/triggers to be fully rendered.
  • Replaced waitFor(getBy...) with findByTestId for stable async querying.
  • Used queryByTestId instead of stale references when validating popup unmount.
  • Introduce test retries for better handling of intermittent failure

@sonarqubecloud
Copy link
Copy Markdown

Please retry analysis of this Pull-Request directly on SonarQube Cloud

Copy link
Copy Markdown
Collaborator

@emi420 emi420 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from my side 👍 thanks @suzit-10

@nischalstha9 nischalstha9 merged commit 61cb20c into develop Nov 12, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants