Repository navigation
fix(tests): await userEvent.click in CsrfErrorMessage compact-mode test - #44540
Conversation
Every other userEvent.click in superset-frontend/src/components/ErrorMessage is awaited; this one wasn't, letting the assertion after the click race the click's own state update. Intermittently failed in CI depending on timing (observed failing consistently in one run, passing in others at the same jest shard), unrelated to whatever else happened to be in the PR that triggered it. Co-Authored-By: Evan Rusackas <evan@preset.io> Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Code Review Agent Run #4dad28Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #44540 +/- ##
==========================================
+ Coverage 66.15% 66.21% +0.05%
==========================================
Files 2946 2948 +2
Lines 176943 177169 +226
Branches 40965 41061 +96
==========================================
+ Hits 117063 117304 +241
+ Misses 57384 57369 -15
Partials 2496 2496
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
SUMMARY
Found while chasing an intermittent
sharded-jest-testsfailure on an unrelated PR:CsrfErrorMessage.test.tsx's compact-mode test callsuserEvent.click(...)withoutawait, letting the assertion right after it race the click's own React state update. Every otheruserEvent.clickcall insrc/components/ErrorMessage/(Database/ErrorMessageWithStackTrace/FrontendNetworkError/ParameterError/TimeoutError) awaits it; this was the only one that didn't.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A, test-only change.
TESTING INSTRUCTIONS
All 3 tests pass.
ADDITIONAL INFORMATION
🤖 Generated with Claude Code