[Lens] Use fireEvent for flyout close-button click to fix Jest timeout - #290263
Merged
kibanamachine merged 2 commits intoSep 11, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
Contributor
Author
⏭️ Flaky-fix verification skippedThis is a Jest-only change, so the Why the flaky test runner wasn't usedThe How release-note and backport labels were chosenApplied
|
kibanamachine
marked this pull request as ready for review
September 10, 2026 10:34
kibanamachine
enabled auto-merge (squash)
September 10, 2026 10:34
markov00
approved these changes
Sep 11, 2026
Contributor
Author
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
|
kibanamachine
deleted the
fix/flaky-290124-flyout-close-fireevent-26c8e706894555c0
branch
September 11, 2026 16:17
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.
Fixes #290124
Summary
await userEvent.click(flyout_wrapper.test.tsx:92) hit the 5000 ms timeout under CI parallel load, while the three synchronous cases rendering the same component passed — the async interaction machinery, not the assertion, ran out of budget.onClick={onCancel}, so nothing needs awaiting. This swapsuserEvent.clickforfireEvent.click(which RTL still wraps inact), removing the pointer/actionability/tooltip-timer overhead while theexpect(onCancel).toHaveBeenCalledTimes(1)still reads synchronously.Context
flyout_wrapper.tsx:112(onClick={onCancel}) and the test file confirmed the diagnosis is still current.kibana-on-merge - main(Jest Tests), reported twice — first on 2026-09-09 and again on 2026-09-10 with the sameExceeded timeout of 5000 mssignature.EuiToolTipthat arms show/hide timers on hover, which is what tippeduserEvent's overhead past the 5s budget under load; the local runtime table above shows the swap cuts the per-test cost by ~64% and removes the tail.Verification
Verified locally
node scripts/eslint x-pack/platform/plugins/shared/lens/public/app_plugin/shared/edit_on_the_fly/flyout_wrapper.test.tsxnode scripts/jest x-pack/platform/plugins/shared/lens/public/app_plugin/shared/edit_on_the_fly/flyout_wrapper.test.tsx: 25/25 passed before the fix (avg 66ms, max 106ms), 25/25 after (avg 24ms, max 27ms)Not verified locally
userEventmachinery and lowers the test's cost, which is the mechanism behind the timeout.Note
Share feedback in #kibana-qa. Mention
@copilotto make quick changes.