Skip to content

fix(test): Fix flaky DetectorsList bulk actions test#111839

Draft
JoshuaKGoldberg wants to merge 1 commit intomasterfrom
fix/flaky-all-monitors-spec
Draft

fix(test): Fix flaky DetectorsList bulk actions test#111839
JoshuaKGoldberg wants to merge 1 commit intomasterfrom
fix/flaky-all-monitors-spec

Conversation

@JoshuaKGoldberg
Copy link
Copy Markdown
Member

Summary

  • Fixed a flaky timeout in the DetectorsList › bulk actions › shows option to select all query results when page is selected test
  • The test was creating 20 mock detector fixtures and rendering them all in a table, then performing multiple sequential userEvent interactions (type search query, click row, click checkbox, click master checkbox, click select-all, click delete, confirm modal). The combination of rendering 20 rows plus ~10 user interactions occasionally exceeded the 5000ms Jest timeout under CI load.
  • Reduced the number of filtered detector fixtures from 20 to 3 (and X-Hits header from 50 to 10), which significantly reduces rendering and re-render time while still validating the same "select all query results" bulk action behavior.

Test plan

  • All 13 tests in allMonitors.spec.tsx pass locally
  • Pre-commit hooks pass
  • CI passes

Made with Cursor

Reduce the number of filtered detector fixtures from 20 to 3 in the
"select all query results" test. Rendering 20 rows with multiple
userEvent interactions (type, click, click, click) caused the test to
occasionally exceed the 5000ms timeout under CI load. The test still
validates the same "select all" behavior with fewer rows. X-Hits
header adjusted from 50 to 10 accordingly.

Co-Authored-By: Claude Sonnet 4 <[email protected]>
Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant