|
1 | 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
|
2 | 2 |
|
3 |
| -exports[`Expect the <ParallaxBanner> component to render custom child banners correctly 1`] = ` |
4 |
| -<div |
5 |
| - className="parallax-banner test-class" |
6 |
| - style={ |
7 |
| - Object { |
8 |
| - "backgroundColor": "blue", |
9 |
| - "border": "1px solid red", |
10 |
| - "height": "50vh", |
11 |
| - "overflow": "hidden", |
12 |
| - "position": "relative", |
13 |
| - "width": "100%", |
14 |
| - } |
15 |
| - } |
16 |
| -> |
| 3 | +exports[`given a <ParallaxBanner> component with all props then it will render banners correctly 1`] = ` |
| 4 | +<DocumentFragment> |
17 | 5 | <div
|
18 |
| - style={ |
19 |
| - Object { |
20 |
| - "bottom": 0, |
21 |
| - "left": 0, |
22 |
| - "position": "absolute", |
23 |
| - "right": 0, |
24 |
| - "top": 0, |
25 |
| - } |
26 |
| - } |
| 6 | + class="parallax-banner test-class" |
| 7 | + style="position: relative; overflow: hidden; width: 100%; height: 50vh; background-color: blue; border: 1px solid red;" |
27 | 8 | >
|
28 | 9 | <div
|
29 |
| - className="parallax-banner-layer-0" |
30 |
| - style={ |
31 |
| - Object { |
32 |
| - "bottom": "-20px", |
33 |
| - "left": 0, |
34 |
| - "position": "absolute", |
35 |
| - "right": 0, |
36 |
| - "top": "-20px", |
37 |
| - } |
38 |
| - } |
| 10 | + style="position: absolute; top: 0px; right: 0px; bottom: 0px; left: 0px; will-change: transform; transform: translateY(-20px);" |
39 | 11 | >
|
40 |
| - <div> |
41 |
| - test |
42 |
| - </div> |
| 12 | + <div |
| 13 | + class="parallax-banner-layer-0" |
| 14 | + data-testid="layer-0" |
| 15 | + style="background-image: url(https://foo.com/bar.jpg); background-position: center; background-size: cover; position: absolute; top: -20px; right: 0px; bottom: -20px; left: 0px;" |
| 16 | + /> |
43 | 17 | </div>
|
44 |
| - </div> |
45 |
| -</div> |
46 |
| -`; |
47 |
| -
|
48 |
| -exports[`Expect the <ParallaxBanner> component to render image banners correctly 1`] = ` |
49 |
| -<div |
50 |
| - className="parallax-banner test-class" |
51 |
| - style={ |
52 |
| - Object { |
53 |
| - "backgroundColor": "blue", |
54 |
| - "border": "1px solid red", |
55 |
| - "height": "50vh", |
56 |
| - "overflow": "hidden", |
57 |
| - "position": "relative", |
58 |
| - "width": "100%", |
59 |
| - } |
60 |
| - } |
61 |
| -> |
62 |
| - <div |
63 |
| - style={ |
64 |
| - Object { |
65 |
| - "bottom": 0, |
66 |
| - "left": 0, |
67 |
| - "position": "absolute", |
68 |
| - "right": 0, |
69 |
| - "top": 0, |
70 |
| - } |
71 |
| - } |
72 |
| - > |
73 |
| - <div |
74 |
| - className="parallax-banner-layer-0" |
75 |
| - style={ |
76 |
| - Object { |
77 |
| - "backgroundImage": "url(https://foo.com/bar.jpg)", |
78 |
| - "backgroundPosition": "center", |
79 |
| - "backgroundSize": "cover", |
80 |
| - "bottom": "-20px", |
81 |
| - "left": 0, |
82 |
| - "position": "absolute", |
83 |
| - "right": 0, |
84 |
| - "top": "-20px", |
85 |
| - } |
86 |
| - } |
87 |
| - /> |
88 |
| - </div> |
89 |
| - <div> |
90 |
| - <h1> |
91 |
| - Foo Bar |
92 |
| - </h1> |
93 |
| - </div> |
94 |
| -</div> |
95 |
| -`; |
96 |
| -
|
97 |
| -exports[`Expect the <ParallaxBanner> component to render layers with custom props 1`] = ` |
98 |
| -<div |
99 |
| - className="parallax-banner" |
100 |
| - style={ |
101 |
| - Object { |
102 |
| - "height": "50vh", |
103 |
| - "overflow": "hidden", |
104 |
| - "position": "relative", |
105 |
| - "width": "100%", |
106 |
| - } |
107 |
| - } |
108 |
| -> |
109 |
| - <div |
110 |
| - style={ |
111 |
| - Object { |
112 |
| - "bottom": 0, |
113 |
| - "left": 0, |
114 |
| - "position": "absolute", |
115 |
| - "right": 0, |
116 |
| - "top": 0, |
117 |
| - } |
118 |
| - } |
119 |
| - > |
120 |
| - <div |
121 |
| - className="parallax-banner-layer-0 my-custom-class" |
122 |
| - id="my-id" |
123 |
| - style={ |
124 |
| - Object { |
125 |
| - "backgroundColor": "red", |
126 |
| - "bottom": "-20px", |
127 |
| - "left": 0, |
128 |
| - "position": "absolute", |
129 |
| - "right": 0, |
130 |
| - "top": "-20px", |
131 |
| - } |
132 |
| - } |
133 |
| - /> |
134 |
| - </div> |
135 |
| -</div> |
136 |
| -`; |
137 |
| -
|
138 |
| -exports[`Expect the <ParallaxBanner> component to render without expanded margins 1`] = ` |
139 |
| -<div |
140 |
| - className="parallax-banner" |
141 |
| - style={ |
142 |
| - Object { |
143 |
| - "height": "50vh", |
144 |
| - "overflow": "hidden", |
145 |
| - "position": "relative", |
146 |
| - "width": "100%", |
147 |
| - } |
148 |
| - } |
149 |
| -> |
150 |
| - <div |
151 |
| - style={ |
152 |
| - Object { |
153 |
| - "bottom": 0, |
154 |
| - "left": 0, |
155 |
| - "position": "absolute", |
156 |
| - "right": 0, |
157 |
| - "top": 0, |
158 |
| - } |
159 |
| - } |
160 |
| - > |
161 |
| - <div |
162 |
| - className="parallax-banner-layer-0" |
163 |
| - style={ |
164 |
| - Object { |
165 |
| - "bottom": 0, |
166 |
| - "left": 0, |
167 |
| - "position": "absolute", |
168 |
| - "right": 0, |
169 |
| - "top": 0, |
170 |
| - } |
171 |
| - } |
172 |
| - > |
173 |
| - <div> |
174 |
| - test |
175 |
| - </div> |
| 18 | + <div> |
| 19 | + <h1> |
| 20 | + Foo Bar |
| 21 | + </h1> |
176 | 22 | </div>
|
177 | 23 | </div>
|
178 |
| -</div> |
| 24 | +</DocumentFragment> |
179 | 25 | `;
|
0 commit comments