Skip to content

fix(test): Fix flaky ResultsSearchQueryBuilder spec#111854

Closed
JoshuaKGoldberg wants to merge 1 commit intomasterfrom
fix/flaky-results-search-query-builder-v3
Closed

fix(test): Fix flaky ResultsSearchQueryBuilder spec#111854
JoshuaKGoldberg wants to merge 1 commit intomasterfrom
fix/flaky-results-search-query-builder-v3

Conversation

@JoshuaKGoldberg
Copy link
Copy Markdown
Member

Add {delay: null} to userEvent.type calls to prevent test timeouts.

Without this option, userEvent types each character with a simulated delay between keystrokes, which can push the total test duration past the 5000ms timeout under CI load. Also use findByRole for the listbox to properly await its async appearance before making assertions.

Two tests in this file were flaking on master (5 occurrences in the last 30 days):

  1. 'does not show function tags in has: dropdown' - timeout
  2. 'shows normal tags, e.g. transaction, in the dropdown' - act() warning from pending async updates

Made with Cursor

Add {delay: null} to userEvent.type calls to prevent timeouts.
Without this, userEvent types each character with a delay, which
can exceed the 5000ms test timeout under CI load. Also use findByRole
for the listbox to properly await its appearance.

Made-with: Cursor
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 30, 2026
@JoshuaKGoldberg JoshuaKGoldberg deleted the fix/flaky-results-search-query-builder-v3 branch March 31, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant