File tree Expand file tree Collapse file tree 3 files changed +5
-32
lines changed Expand file tree Collapse file tree 3 files changed +5
-32
lines changed Original file line number Diff line number Diff line change 11// Jest Snapshot v1, https://goo.gl/fbAQLP
22
3- exports [` given the <Parallax > component given the <Parallax > component when given children then it renders them 1`] = `
4- <DocumentFragment >
5- <div
6- style = " will-change: transform;"
7- >
8- <div
9- class = " foo"
10- />
11- </div >
12- </DocumentFragment >
13- `;
14-
15- exports[`given the <Parallax > component given the <Parallax > component when normal configurations are given then it renders correctly 1`] = `
16- <DocumentFragment >
17- <div
18- class = " class-foo"
19- style = " border: 2px solid red; will-change: transform; transform: translateX(100%)translateY(100%);"
20- >
21- <div
22- class = " foo"
23- />
24- </div >
25- </DocumentFragment >
26- `;
27-
283exports [` given the <Parallax > component when normal configurations are given then it renders correctly 1`] = `
294<DocumentFragment >
305 <div
Original file line number Diff line number Diff line change @@ -66,17 +66,14 @@ describe('given the <Parallax> component', () => {
6666 id = "test-id"
6767 data-testid = "data-test-id"
6868 data-foo = "bar"
69- aria-role = "button "
69+ aria-label = "Cool "
7070 />
7171 </ ParallaxProvider >
7272 ) ;
7373 expect ( getByTestId ( 'data-test-id' ) ) . toBeInTheDocument ( ) ;
7474 expect ( container . querySelector ( '.my-class' ) ) . toBeInTheDocument ( ) ;
7575 expect ( container . querySelector ( '#test-id' ) ) . toBeInTheDocument ( ) ;
76- expect ( getByTestId ( 'data-test-id' ) ) . toHaveAttribute (
77- 'aria-role' ,
78- 'button'
79- ) ;
76+ expect ( getByTestId ( 'data-test-id' ) ) . toHaveAttribute ( 'aria-label' , 'Cool' ) ;
8077 expect ( getByTestId ( 'data-test-id' ) ) . toHaveAttribute ( 'data-foo' , 'bar' ) ;
8178 expect ( getByTestId ( 'data-test-id' ) . style . background ) . toBe ( 'red' ) ;
8279 } ) ;
Original file line number Diff line number Diff line change 11import React , { PropsWithChildren } from 'react' ;
2+ import { CSSProperties } from 'react' ;
23import { Parallax } from '../Parallax' ;
34import { ParallaxBannerProps } from './types' ;
45
5- const containerStyle = {
6+ const containerStyle : CSSProperties = {
67 position : 'relative' ,
78 overflow : 'hidden' ,
89 width : '100%' ,
910 height : '50vh' ,
1011} ;
1112
12- const absoluteStyle = {
13+ const absoluteStyle : CSSProperties = {
1314 position : 'absolute' ,
1415 top : 0 ,
1516 right : 0 ,
You can’t perform that action at this time.
0 commit comments