File tree Expand file tree Collapse file tree 2 files changed +8
-11
lines changed
Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -20,14 +20,11 @@ const MotionImage = motion(CustomImage)
2020export default function Page ( ) {
2121 const [ clicked , setClicked ] = useState ( false )
2222 return (
23- < >
24- < h1 > Framer demo</ h1 >
25- < MotionImage
26- onClick = { ( ) => setClicked ( true ) }
27- initial = { { opacity : 1 } }
28- animate = { { opacity : clicked ? 0 : 1 } }
29- transition = { { duration : 0.5 } }
30- />
31- </ >
23+ < MotionImage
24+ onClick = { ( ) => setClicked ( true ) }
25+ initial = { { opacity : 1 } }
26+ animate = { { opacity : clicked ? 0 : 1 } }
27+ transition = { { duration : 0.5 } }
28+ />
3229 )
3330}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { waitFor } from 'next-test-utils'
44import path from 'path'
55import webdriver from 'next-webdriver'
66
7- describe ( 'next-image' , ( ) => {
7+ describe ( 'next-image-forward-ref ' , ( ) => {
88 let next : NextInstance
99
1010 const appDir = path . join ( __dirname , 'app' )
@@ -20,7 +20,7 @@ describe('next-image', () => {
2020 afterAll ( ( ) => next . destroy ( ) )
2121
2222 it ( 'allows framer-motion to animate opacity' , async ( ) => {
23- const browser = await webdriver ( next . url , '/' )
23+ const browser = await webdriver ( next . url , '/framer-motion ' )
2424 expect (
2525 Number ( await browser . elementById ( 'img' ) . getComputedCss ( 'opacity' ) )
2626 ) . toBeCloseTo ( 1 )
You can’t perform that action at this time.
0 commit comments