Skip to content

Commit

Permalink
Fixing test timings
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgperry committed Dec 13, 2024
1 parent 4fdf6f0 commit 645d449
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dev/react/src/tests/waapi-sync.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const App = () => {
syncExplicitAnimation.startTime?.toString() ||
"sync explicit start time not available"
)
}, 500)
}, 1000)

return () => {
waapiAnimation.stop()
Expand Down
7 changes: 2 additions & 5 deletions packages/framer-motion/cypress/integration/layout-shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,13 @@ describe("Shared layout: A -> B transition", () => {
expect(getComputedStyle($box).opacity).to.equal("0.4")
})
.trigger("click")
.wait(50)
.wait(200)
.get("#b")
/**
* Test that onLayoutAnimationStart fires
*/
.should(([$box]: any) => {
expect($box.style.backgroundColor).to.equal("rgb(0, 255, 0)")
})
.wait(100)
.should(([$box]: any) => {
expect(window.getComputedStyle($box).borderRadius).to.equal(
"5% / 4%"
)
Expand All @@ -74,7 +71,7 @@ describe("Shared layout: A -> B transition", () => {
/**
* Test that onLayoutAnimationComplete fires
*/
.wait(300)
.wait(800)
.should(([$box]: any) => {
expect($box.style.backgroundColor).to.equal("rgb(0, 0, 255)")
})
Expand Down
2 changes: 1 addition & 1 deletion packages/framer-motion/cypress/integration/waapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe("waapi", () => {

it("Should match WAAPI and main thread startTimes, and allow explicitly setting startTime", () => {
cy.visit("?test=waapi-sync")
.wait(1500)
.wait(2000)
// Automatically recorded startTime should be the same between main thread and WAAPI
.get(".auto-timer")
.should(([waapi, sync]: any) => {
Expand Down

0 comments on commit 645d449

Please sign in to comment.