Skip to content

Commit

Permalink
Updating test
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgperry committed Oct 11, 2024
1 parent 6253613 commit 4215639
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dev/react/src/tests/layout-shared-switch-a-b.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 @@ -21,7 +21,7 @@ export const App = () => {
opacity: state ? 0.4 : 1,
}}
onClick={() => setState(!state)}
transition={{ duration: 0.2, ease: () => 0.5 }}
transition={{ duration: 0.3, ease: () => 0.5 }}
onLayoutAnimationStart={() => backgroundColor.set("#0f0")}
onLayoutAnimationComplete={() => backgroundColor.set("#00f")}
/>
Expand Down
2 changes: 1 addition & 1 deletion packages/framer-motion-3d/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@
"@rollup/plugin-commonjs": "^22.0.1",
"three": "^0.137.0"
},
"gitHead": "f714dd9da655810556299ad1a6232746f873ae19"
"gitHead": "625361373b6cf282e41e0a4caae5ad7ea37cb61a"
}
3 changes: 2 additions & 1 deletion packages/framer-motion/cypress/integration/layout-shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,15 @@ describe("Shared layout: A -> B transition", () => {
expect(getComputedStyle($box).opacity).to.equal("0.4")
})
.trigger("click")
.wait(50)
.get("#b")
/**
* Test that onLayoutAnimationStart fires
*/
.should(([$box]: any) => {
expect($box.style.backgroundColor).to.equal("rgb(0, 255, 0)")
})
.wait(50)
.wait(100)
.should(([$box]: any) => {
expect(window.getComputedStyle($box).borderRadius).to.equal(
"5% / 4%"
Expand Down
2 changes: 1 addition & 1 deletion packages/framer-motion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,5 @@
"maxSize": "2.5 kB"
}
],
"gitHead": "f714dd9da655810556299ad1a6232746f873ae19"
"gitHead": "625361373b6cf282e41e0a4caae5ad7ea37cb61a"
}

0 comments on commit 4215639

Please sign in to comment.