Repository navigation
E2E: Tolerate the insertion indicator remount in drag tests - #85270
Merged
Merged
Conversation
Indicator is remounted on every drop target change, so boundingBox can return null mid-poll; expect.poll rethrows instead of retrying. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
🤖 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. Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: 0 B Total Size: 9.05 MB
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. Regression: updating a specific option will only change its value and will not corrupt others in
|
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 the flaky failures reported in #85263:
The drop target computation is throttled at 200 ms, so a drag that moves in steps first shows the indicator for an intermediate pointer position and corrects it ~200 ms later. Each drop target change remounts the indicator, because
BlockPopoverInbetweenkeys the popover by its position to stop it animating from the old one.locator.boundingBox()resolves the element and measures it in two round trips and returnsnullif the node detaches in between, andexpect.pollcalls its callback outside the try/catch that drives retries — so thenulldereference fails the test instead of polling again.The measurements now tolerate an empty box and fall back to a value that keeps the poll running instead of passing it.
Testing Instructions
Verified:
draggable-blocks.spec.js20/20 on chromium, and the multi-selection tests 64/64 at--repeat-each=8 --workers=4.Use of AI Tools
Assisted by Claude.