From 89b8b6e20718e5564866981794645444dff56c45 Mon Sep 17 00:00:00 2001 From: Christopher Chedeau Date: Wed, 4 Nov 2026 09:14:34 -0800 Subject: [PATCH] test(core): the copy test's entrances outlast any setup The copy test styles three entrances at 100 ms and finishes them itself after the page loads, an evaluate round trip and a frame. On a loaded runner that setup takes longer than 100 ms, so the backwards-filled and unfilled entrances have already ended and left the element, and getAnimations()[0] is undefined (seen in pr-interaction-webkit). The entrances now last 100 s, so each still runs when the test reads it, and finish() ends it there as before. What the test checks is unchanged: no entrance plays again in the copy, whether it holds its end or not. --- .../__tests__/animatedLayout.interaction.browser.spec.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/core/src/motion/__tests__/animatedLayout.interaction.browser.spec.ts b/packages/core/src/motion/__tests__/animatedLayout.interaction.browser.spec.ts index 43a1f06930f42..8da948aebf16d 100644 --- a/packages/core/src/motion/__tests__/animatedLayout.interaction.browser.spec.ts +++ b/packages/core/src/motion/__tests__/animatedLayout.interaction.browser.spec.ts @@ -2883,9 +2883,9 @@ test.describe('spec:AST-105 FR9 (the edge reveal)', () => { .fade { display: inline-block; transition: opacity 1000ms linear; } .fade.out { opacity: 0; } @keyframes copy-enter { from { translate: 0 20px; } to { translate: 0 0; } } - .entered { display: inline-block; animation: copy-enter 100ms linear both; } - .entered-backwards { display: inline-block; animation: copy-enter 100ms linear backwards; } - .entered-unfilled { display: inline-block; animation: copy-enter 100ms linear; } + .entered { display: inline-block; animation: copy-enter 100s linear both; } + .entered-backwards { display: inline-block; animation: copy-enter 100s linear backwards; } + .entered-unfilled { display: inline-block; animation: copy-enter 100s linear; } .arrived { display: inline-block; transition: opacity 1000ms linear; } @starting-style { .arrived { opacity: 0; } }`, ); @@ -2904,6 +2904,8 @@ test.describe('spec:AST-105 FR9 (the edge reveal)', () => { // The old state runs a looping animation 400 ms in, and a transition // 400 ms into its second. Three entrances have played. One holds its // end, and two (backwards-filled and unfilled) have left the element. + // Each entrance lasts 100 s, so it still runs here on a loaded machine, + // and finish() ends it. const [pulse] = pick(panel, 'pulse').getAnimations(); pulse.currentTime = 400; pick(panel, 'fade').classList.add('out');