Skip to content

test(webui): read the rail flyout's exit animation from the event it fires - #23

Merged
UncleMoc merged 1 commit into
mainfrom
fix/rail-archive-exit-observation
Nov 10, 2026
Merged

UncleMoc merged 1 commit into
mainfrom
fix/rail-archive-exit-observation

Conversation

@UncleMoc

Copy link
Copy Markdown
Collaborator

What

packages/webui/test/browser/rail-archive.spec.mjs asserted that the rail's context-menu flyout leaves through the shared surface exit by reading the element's computed animation-name at 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:

Expected: "webui-motion-surface-exit"
Received: ""

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

  • The file's two cases pass 5/5 repetitions locally (10 test results, no failures).
  • A probe that removes the exit animation from the stylesheet turns the case red with the same expected/received pair, so the assertion still bites when the shared exit does not run.

Notes

This is the case that reddened the macOS job on dependabot PR #3. The change is test-only; no product code is touched.

…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.
@UncleMoc
UncleMoc merged commit cb49b84 into main Nov 10, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant