Repository navigation
Commit 6fc2bff
test(interaction-harness): sampleCurve samples a ::before or ::after (#10052)
* test(interaction-harness): sampleCurve samples a ::before or ::after
A component that animates a pseudo-element (animatorFor(element, {pseudoElement: '::before'})) drew its motion where sampleCurve could not read it: it labelled samples by the element's own animations only and read the element's computed style. sampleCurve(locator, times, {pseudoElement}) now reads that pseudo-element's presented values, labelled by its own animations (those whose effect targets the element with that pseudo-element). Without the option nothing changes.
waitForRest already waits a pseudo-element's animation out: its read of getAnimations({subtree: true}) includes the element's pseudo-elements in Chromium and WebKit. A self-test now guards that.
Red first: on main's curves.ts the new self-test samples the box itself (opacity 1 at t 0, where the veil's is 0) in both engines; with the option it matches the veil's linear fade to 0.005 and its 40 px move to 0.05 px. The README describes the option in the curve-sampling paragraph, outside the module table.
* docs(interaction-harness): sampleCurve's pseudoElement note names the call that exists on main
astracat found that the note cited `animatorFor(element, {pseudoElement})`, an animator option that arrives with #8242 and isn't on main. It now names `element.animate(keyframes, {pseudoElement})`, the call the self-test uses.
Co-authored-by: Christopher Chedeau <vjeuxx@gmail.com>1 parent 159aceb commit 6fc2bff
3 files changed
Lines changed: 101 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
132 | 135 | | |
133 | 136 | | |
134 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
897 | 897 | | |
898 | 898 | | |
899 | 899 | | |
900 | | - | |
| 900 | + | |
| 901 | + | |
901 | 902 | | |
902 | 903 | | |
903 | 904 | | |
| |||
931 | 932 | | |
932 | 933 | | |
933 | 934 | | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
934 | 940 | | |
935 | 941 | | |
936 | 942 | | |
937 | 943 | | |
| 944 | + | |
938 | 945 | | |
939 | 946 | | |
940 | | - | |
| 947 | + | |
941 | 948 | | |
942 | 949 | | |
943 | 950 | | |
| |||
960 | 967 | | |
961 | 968 | | |
962 | 969 | | |
963 | | - | |
964 | | - | |
965 | | - | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
966 | 975 | | |
967 | 976 | | |
968 | | - | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
969 | 981 | | |
970 | 982 | | |
971 | 983 | | |
| |||
1014 | 1026 | | |
1015 | 1027 | | |
1016 | 1028 | | |
1017 | | - | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
1018 | 1033 | | |
1019 | 1034 | | |
1020 | 1035 | | |
| |||
1118 | 1133 | | |
1119 | 1134 | | |
1120 | 1135 | | |
1121 | | - | |
| 1136 | + | |
1122 | 1137 | | |
1123 | 1138 | | |
1124 | 1139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2596 | 2596 | | |
2597 | 2597 | | |
2598 | 2598 | | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
| 2604 | + | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
| 2608 | + | |
| 2609 | + | |
| 2610 | + | |
| 2611 | + | |
| 2612 | + | |
| 2613 | + | |
| 2614 | + | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
| 2618 | + | |
| 2619 | + | |
| 2620 | + | |
| 2621 | + | |
| 2622 | + | |
| 2623 | + | |
| 2624 | + | |
| 2625 | + | |
| 2626 | + | |
| 2627 | + | |
| 2628 | + | |
| 2629 | + | |
| 2630 | + | |
| 2631 | + | |
| 2632 | + | |
| 2633 | + | |
| 2634 | + | |
| 2635 | + | |
| 2636 | + | |
| 2637 | + | |
| 2638 | + | |
| 2639 | + | |
| 2640 | + | |
| 2641 | + | |
| 2642 | + | |
| 2643 | + | |
| 2644 | + | |
| 2645 | + | |
| 2646 | + | |
| 2647 | + | |
| 2648 | + | |
| 2649 | + | |
| 2650 | + | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + | |
| 2656 | + | |
| 2657 | + | |
| 2658 | + | |
| 2659 | + | |
| 2660 | + | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
| 2664 | + | |
| 2665 | + | |
| 2666 | + | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
2599 | 2674 | | |
2600 | 2675 | | |
2601 | 2676 | | |
| |||
0 commit comments