Repository navigation
test(webui): read the rail flyout's exit animation from the event it fires - #23
Merged
Merged
Conversation
…fires The shared surface exit runs for 120ms and the flyout is unmounted when it ends, so reading the element's computed animation-name after the exit state has appeared is a race: on a loaded runner the read lands after the animation has been cleaned up and sees an empty value, which says nothing about whether the shared exit ran. The sibling surfaces already read their exit from the animation event, which is what happened rather than what one instant of the page looks like. The expected values are unchanged: the exit state, the shared surface exit animation, and the flyout going away.
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
packages/webui/test/browser/rail-archive.spec.mjsasserted that the rail's context-menu flyout leaves through the shared surface exit by reading the element's computedanimation-nameat one instant, right after the exit state appeared.The shared exit runs for 120ms (
--webui-motion-duration-popup-exit) and the flyout is unmounted when it ends, so that read is a race. On a loaded runner the round trip after the state assertion lands after the animation has been cleaned up, the computed value comes back empty, and the case fails even though the exit ran exactly as it should:The same case passes on the same commit in a faster run, which is what makes it read as a flake rather than a defect.
How
Read the exit from the animation event it fires, the way the sibling surfaces already read theirs (
goal-retention.spec.mjs,plugin-catalogue-layout.spec.mjs,account-login.spec.mjs). The event carries the name at the moment the animation starts, so a late read cannot miss it.The expected values are unchanged: the flyout still has to enter through the shared surface motion, still has to switch to the exit state, still has to run the shared surface exit animation, and still has to go away.
Verification
Notes
This is the case that reddened the macOS job on dependabot PR #3. The change is test-only; no product code is touched.