Repository navigation
Fix tooltip custom delay test flake - #86312
Merged
Merged
Conversation
🤖 PR meta 🤖🎉 PropsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: 0 B Total Size: 8.61 MB
|
Member
Drive the custom delay test with a fake setTimeout clock, as #84113 did for the cancellation test, so browser command latency cannot consume the delay or the 10s test budget.
lucatume
force-pushed
the
fix/typography-panel-contrast-flake
branch
from
November 9, 2026 06:44
9e01bf5 to
cf08b2b
Compare
Contributor
Author
|
Dropped the typography change; the PR now only fixes the tooltip delay test. |
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.
What?
Fixes the flaky Vitest Browser test
tooltip/test/index.browser.test.tsx: "should respect custom delay prop when showing tooltip". Test-only change.The typography panel contrast warning flake this PR originally also fixed was fixed on trunk by #86403.
Why?
The test failed with
Test timed out in 10000msin 41771518157.How?
The test slept 4.2s of real time, plus
waitForand Playwright hover round-trips, within a 10s budget, so one slow browser command could exhaust it or consume the hover delay. It now follows #84113, which fixed the sibling cancellation test: park the pointer, fakesetTimeout/clearTimeout, hover, and advance the clock. It asserts the tooltip is hidden atdelay - 1and visible atdelay. Removed:sleep( 3000 ): Ariakit's "show instantly after a hide" window is a 300mssetTimeout, and it is cleared when the anchor unmounts;10_000timeout override.Testing Instructions
Local evidence:
showTimeoutintooltip/index.tsxall fail the new test:TOOLTIP_DELAY,delay ± 1,delay ± 300and0. The old test passeddelay - 300anddelay ± 1.Not verifiable locally: the natural CI stall. Without added latency, the old tooltip test never failed locally, even under CPU load. Watching trunk runs after merge confirms the fix.
Testing Instructions for Keyboard
N/A, test-only.
Use of AI Tools
Investigation, fix, mutation testing and this description by Claude Code (Claude Opus), reviewed by me.