diff --git a/dev/react/src/tests/layout.tsx b/dev/react/src/tests/layout.tsx index 230d8f0800..9149e3cba5 100644 --- a/dev/react/src/tests/layout.tsx +++ b/dev/react/src/tests/layout.tsx @@ -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) @@ -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")} /> diff --git a/packages/framer-motion/cypress/integration/layout.ts b/packages/framer-motion/cypress/integration/layout.ts index 56c696b0bc..420b8bfee6 100644 --- a/packages/framer-motion/cypress/integration/layout.ts +++ b/packages/framer-motion/cypress/integration/layout.ts @@ -27,6 +27,7 @@ describe("Layout animation", () => { }) }) .trigger("click") + .wait(50) /** * Test that onLayoutAnimationStart fires */ @@ -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") })