Repository navigation
test(explore): await the Customize tab click in ControlPanelsContainer test - #44315
Conversation
Code Review Agent Run #b8ec0dActionable 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 |
…r test user-event 14 made click() async; the un-awaited call let waitFor start while the click was still dispatching, spending its 1000ms budget on the click itself and intermittently failing on loaded CI runners. Fixes apache#44314
f9d288a to
29a12ee
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #44315 +/- ##
=======================================
Coverage 80.23% 80.23%
=======================================
Files 2927 2927
Lines 173273 173273
Branches 40173 40173
=======================================
+ Hits 139027 139028 +1
+ Misses 31646 31645 -1
Partials 2600 2600
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:
|
Code Review Agent Run #68d202Actionable 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 |
There was a problem hiding this comment.
Reviewed at 29a12ee, no actionable findings.
Awaiting the user-event v14 click correctly sequences the interaction before the existing waitFor. Both the four-panel and five-panel assertions remain intact, without increased timeouts, retries, or production changes. Current-head CI is green, including all eight Jest shards.
Validation limit: this was a source review plus CI-status verification; we did not run local tests or independently reproduce the original intermittent failure. The timing measurements remain author-reported evidence.
Approved. Review prepared and posted by Codex at Mike Bridge’s request.
rusackas
left a comment
There was a problem hiding this comment.
Nice catch on the user-event v14 timing shift, that explains the flakiness well. LGTM, approving!
SUMMARY
ControlPanelsContainer › renders ControlPanelSectionsintermittently fails insharded-jest-tests (4)withExpected length: 5, Received length: 4(3 failures on 2026-09-14, one onmaster; details in #44314).The test clicks the Customize tab without awaiting it. That was harmless under
@testing-library/user-event12, whereclickwas synchronous, but #43512 moved the repo to 14, where every call returns a promise and dispatches its events across timer yields. With the call un-awaited, the followingwaitForstarts while the click is still in flight, so the click's dispatch time comes out ofwaitFor's 1000 ms budget. On a loaded runner that budget runs out before the Customize section renders.This PR adds the missing
await. It is the only un-awaiteduserEventcall in the file. The assertion is unchanged: no widened timeout, no retries.Locally, instrumenting the test showed the click resolving +100 ms into
waitFor(4 polls) withoutawait, versus resolving beforewaitForstarts (1 poll) with it.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A: test-only change.
TESTING INSTRUCTIONS
All 11 tests pass (5/5 local runs on Node 24.16.0).
Note: I could not force the original failure locally. The unmodified test passed 12/12 runs under full CPU load, and shard 4 passed 3/3 runs pinned to 4 cores with coverage. The case for the fix is the CI history in the linked issue plus the timing measurement above.
ADDITIONAL INFORMATION