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 1
1
// Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
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
-
28
3
exports [` given the <Parallax > component when normal configurations are given then it renders correctly 1`] = `
29
4
<DocumentFragment >
30
5
<div
Original file line number Diff line number Diff line change @@ -66,17 +66,14 @@ describe('given the <Parallax> component', () => {
66
66
id = "test-id"
67
67
data-testid = "data-test-id"
68
68
data-foo = "bar"
69
- aria-role = "button "
69
+ aria-label = "Cool "
70
70
/>
71
71
</ ParallaxProvider >
72
72
) ;
73
73
expect ( getByTestId ( 'data-test-id' ) ) . toBeInTheDocument ( ) ;
74
74
expect ( container . querySelector ( '.my-class' ) ) . toBeInTheDocument ( ) ;
75
75
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' ) ;
80
77
expect ( getByTestId ( 'data-test-id' ) ) . toHaveAttribute ( 'data-foo' , 'bar' ) ;
81
78
expect ( getByTestId ( 'data-test-id' ) . style . background ) . toBe ( 'red' ) ;
82
79
} ) ;
Original file line number Diff line number Diff line change 1
1
import React , { PropsWithChildren } from 'react' ;
2
+ import { CSSProperties } from 'react' ;
2
3
import { Parallax } from '../Parallax' ;
3
4
import { ParallaxBannerProps } from './types' ;
4
5
5
- const containerStyle = {
6
+ const containerStyle : CSSProperties = {
6
7
position : 'relative' ,
7
8
overflow : 'hidden' ,
8
9
width : '100%' ,
9
10
height : '50vh' ,
10
11
} ;
11
12
12
- const absoluteStyle = {
13
+ const absoluteStyle : CSSProperties = {
13
14
position : 'absolute' ,
14
15
top : 0 ,
15
16
right : 0 ,
You can’t perform that action at this time.
0 commit comments