fix(test): stabilize flaky EventsSearchBar has: dropdown test#111903
Merged
JoshuaKGoldberg merged 3 commits intomasterfrom Apr 9, 2026
Merged
fix(test): stabilize flaky EventsSearchBar has: dropdown test#111903JoshuaKGoldberg merged 3 commits intomasterfrom
JoshuaKGoldberg merged 3 commits intomasterfrom
Conversation
e347c0d to
047a158
Compare
0eac819 to
b73441e
Compare
b73441e to
817a7df
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Member
Author
|
😩 Cursor changed the PR incorrectly and tagged everyone... |
The test timed out at 5000ms on slow CI machines because the
SearchQueryBuilder component's debounce timers (300ms) and complex
rendering combined to push execution time past the threshold.
Add missing mock for /organizations/org-slug/tags/ endpoint, use
jest.useFakeTimers() with userEvent.setup({advanceTimers}) to
eliminate real timer delays, and use findByRole for the edit button
to properly await its appearance after paste.
Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Made-with: Cursor
f3d83a8 to
02a2b71
Compare
scttcper
approved these changes
Apr 8, 2026
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.
The
has:dropdown values come fromuseTags()which readsTagStore. In this unit test, no parent page component callsloadOrganizationTags, butSearchQueryBuilderstill fires aGET /organizations/org-slug/tags/request internally. Without a mock, that request silently fails (mock client swallows it), leaving the dropdown unreliably populated./organizations/org-slug/tags/so thehas:dropdown is deterministically populatedfindByRoleinstead ofgetByRolefor elements that appear asynchronouslywaitForat end of each test to let pending state updates settle before unmountFixes DAIN-1271
Made with Cursor