Skip to content

Commit b1b89aa

Browse files
vjeuxcixzhang
andauthored
test(core): the copy test's entrances outlast any setup (#9991)
* 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. * Merge branch 'main' into uikit/f1-copy-test-entrances-outlast-setup Co-authored-by: Cindy Zhang <cindyxz@meta.com>
1 parent 504ee18 commit b1b89aa

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎packages/core/src/motion/__tests__/animatedLayout.interaction.browser.spec.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2883,9 +2883,9 @@ test.describe('spec:AST-105 FR9 (the edge reveal)', () => {
28832883
.fade { display: inline-block; transition: opacity 1000ms linear; }
28842884
.fade.out { opacity: 0; }
28852885
@keyframes copy-enter { from { translate: 0 20px; } to { translate: 0 0; } }
2886-
.entered { display: inline-block; animation: copy-enter 100ms linear both; }
2887-
.entered-backwards { display: inline-block; animation: copy-enter 100ms linear backwards; }
2888-
.entered-unfilled { display: inline-block; animation: copy-enter 100ms linear; }
2886+
.entered { display: inline-block; animation: copy-enter 100s linear both; }
2887+
.entered-backwards { display: inline-block; animation: copy-enter 100s linear backwards; }
2888+
.entered-unfilled { display: inline-block; animation: copy-enter 100s linear; }
28892889
.arrived { display: inline-block; transition: opacity 1000ms linear; }
28902890
@starting-style { .arrived { opacity: 0; } }`,
28912891
);
@@ -2904,6 +2904,8 @@ test.describe('spec:AST-105 FR9 (the edge reveal)', () => {
29042904
// The old state runs a looping animation 400 ms in, and a transition
29052905
// 400 ms into its second. Three entrances have played. One holds its
29062906
// end, and two (backwards-filled and unfilled) have left the element.
2907+
// Each entrance lasts 100 s, so it still runs here on a loaded machine,
2908+
// and finish() ends it.
29072909
const [pulse] = pick(panel, 'pulse').getAnimations();
29082910
pulse.currentTime = 400;
29092911
pick(panel, 'fade').classList.add('out');

0 commit comments

Comments
 (0)