-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fix(UI): Users playwright flakyness #25736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
|
||
| const upperCasedName = user.responseData.name.toUpperCase(); | ||
| const userName = user3.responseData.name; | ||
| const userDisplayName = user3.responseData.displayName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Edge Case: Missing null safety for user3.responseData.displayName
The variable userDisplayName is assigned user3.responseData.displayName (line 294) without a fallback, even though displayName is an optional field in the OpenMetadata user data model. This value is later passed to toHaveText(userDisplayName) at line 351, which would fail if displayName is undefined.
The same PR correctly applies null safety for persona1.responseData.displayName using ?? at line 874, but misses doing so here.
Suggested fix:
const userDisplayName = user3.responseData.displayName ?? user3.responseData.name;This matches the defensive pattern already used at line 874 and prevents a flaky test failure when displayName is not set.
Was this helpful? React with 👍 / 👎
Code Review 👍 Approved with suggestions 0 resolved / 4 findingsSolid fix for test flakiness — improved test isolation, corrected entity references, and better popover handling. Previous minor findings (null safety, regex escaping, semicolon, formatting) remain unresolved.
|
| Auto-apply | Compact |
|
|
Was this helpful? React with 👍 / 👎 | Gitar
|



Summary by Gitar
.toUpperCase()calls on usernames inUsers.spec.tsthat caused selector mismatchesusertouser3in custom property testsconsttoletand moved initialization tobeforeAllhook for proper cleanup between test runstest.slow(true)from 5 test suites to improve execution timeThis will update automatically on new commits.