File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ test.describe("animate() methods", () => {
30
30
} )
31
31
32
32
test ( "play with repeat: reverse" , async ( { page } ) => {
33
- await waitForAnimation ( "animate/animate-repeat-play.html" , page )
33
+ await waitForAnimation ( "animate/animate-repeat-play.html" , page , 600 )
34
34
await eachBox ( page , async ( box ) => {
35
35
// Verify the box is at its original position
36
36
const boundingBox = await box . boundingBox ( )
@@ -310,6 +310,14 @@ test.describe("animate() methods", () => {
310
310
expect ( style ) . toContain ( "transform: translateX" )
311
311
expect ( await box . innerText ( ) ) . toBe ( "finished" )
312
312
} )
313
+
314
+ const boxes = page . locator ( ".box" )
315
+ const jsBox = boxes . nth ( 1 )
316
+ const waapiBox = boxes . nth ( 2 )
317
+ const jsX = Math . round ( ( await jsBox . boundingBox ( ) ) ?. x || 100 )
318
+ const waapiX = Math . round ( ( await waapiBox . boundingBox ( ) ) ?. x || 50 )
319
+
320
+ expect ( Math . abs ( jsX - waapiX ) ) . toBeLessThanOrEqual ( 2 )
313
321
} )
314
322
315
323
test ( "stop() prevents animation from restarting with play()" , async ( {
You can’t perform that action at this time.
0 commit comments