Skip to content

Commit

Permalink
Loosen test timing
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgperry authored and mergatron[bot] committed Oct 10, 2024
1 parent 8b04bac commit 785a4c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dev/react/src/tests/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { motion, useMotionValue } from "framer-motion"
import { useState } from "react";
import { useState } from "react"

export const App = () => {
const params = new URLSearchParams(window.location.search)
Expand All @@ -14,7 +14,7 @@ export const App = () => {
layout={type}
style={{ ...(state ? a : b), backgroundColor }}
onClick={() => setState(!state)}
transition={{ duration: 0.1, ease: () => 0.5 }}
transition={{ duration: 0.2, ease: () => 0.5 }}
onLayoutAnimationStart={() => backgroundColor.set("green")}
onLayoutAnimationComplete={() => backgroundColor.set("blue")}
/>
Expand Down
3 changes: 2 additions & 1 deletion packages/framer-motion/cypress/integration/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ describe("Layout animation", () => {
})
})
.trigger("click")
.wait(50)
/**
* Test that onLayoutAnimationStart fires
*/
Expand All @@ -45,7 +46,7 @@ describe("Layout animation", () => {
/**
* Test that onLayoutAnimationComplete fires
*/
.wait(200)
.wait(300)
.should(([$box]: any) => {
expect($box.style.backgroundColor).to.equal("blue")
})
Expand Down

0 comments on commit 785a4c5

Please sign in to comment.