Skip to content

Commit 7cd57ac

Browse files
author
Richard Bangay
committed
update snapshot tests and remove unnecessary 'key' prop from mocked product response to avoid react warning when running the snapshot tests
1 parent 17c503a commit 7cd57ac

File tree

5 files changed

+80
-103
lines changed

5 files changed

+80
-103
lines changed

client/__tests__/__snapshots__/main.test.tsx.snap

+15-11
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ exports[`Main renders something 1`] = `
2121
.emotion-1 {
2222
color: #052962;
2323
position: absolute;
24-
text-align: center;
25-
font-size: 12px;
24+
textalign: center;
25+
fontsize: 12px;
2626
}
2727
2828
.emotion-1:focus {
@@ -111,7 +111,7 @@ exports[`Main renders something 1`] = `
111111
}
112112
113113
.emotion-7 {
114-
font-family: "GuardianTextEgyptian",Georgia,serif;
114+
font-family: GuardianTextEgyptian,"Guardian Text Egyptian Web",Georgia,serif;
115115
-webkit-box-flex: 1;
116116
-webkit-flex-grow: 1;
117117
-ms-flex-positive: 1;
@@ -268,10 +268,13 @@ exports[`Main renders something 1`] = `
268268
269269
.emotion-58 {
270270
color: #FFE500;
271-
font-family: GH Guardian Headline,"GuardianTextEgyptian",Georgia,serif;
272-
font-size: 24px;
271+
font-family: "GH Guardian Headline","Guardian Egyptian Web",Georgia,serif;
272+
font-size: 1.5rem;
273+
line-height: 1.15;
274+
font-weight: 700;
275+
font-style: normal;
276+
--source-text-decoration-thickness: 3px;
273277
line-height: 24px;
274-
font-weight: bold;
275278
margin-top: 3px;
276279
margin-bottom: 12px;
277280
}
@@ -294,9 +297,10 @@ exports[`Main renders something 1`] = `
294297
display: -webkit-inline-flex;
295298
display: -ms-inline-flexbox;
296299
display: inline-flex;
297-
-webkit-box-pack: justify;
298-
-webkit-justify-content: space-between;
299-
justify-content: space-between;
300+
-webkit-box-pack: center;
301+
-ms-flex-pack: center;
302+
-webkit-justify-content: center;
303+
justify-content: center;
300304
-webkit-align-items: center;
301305
-webkit-box-align: center;
302306
-ms-flex-align: center;
@@ -833,7 +837,7 @@ html:not(.src-focus-disabled) .emotion-63 :focus {
833837
>
834838
<path
835839
clipRule="evenodd"
836-
d="M1 12.956h18.274l-7.167 8.575.932.932L23 12.478v-.956l-9.96-9.985-.932.932 7.166 8.575H1v1.912Z"
840+
d="M1 12.956h18.274l-7.167 8.575.932.932L23 12.478v-.956l-9.96-9.985-.932.932 7.166 8.575H1z"
837841
fillRule="evenodd"
838842
/>
839843
</svg>
@@ -864,7 +868,7 @@ html:not(.src-focus-disabled) .emotion-63 :focus {
864868
>
865869
<path
866870
clipRule="evenodd"
867-
d="M23 16.768 12.502 6.27h-1.004L1 16.768l.98.954L12 9.284l10.02 8.438.98-.954Z"
871+
d="M23 16.768 12.502 6.27h-1.004L1 16.768l.98.954L12 9.284l10.02 8.438z"
868872
fillRule="evenodd"
869873
/>
870874
</svg>

client/__tests__/components/helpCentre/__snapshots__/helpCentreContactOptions.test.tsx.snap

+5-4
Original file line numberDiff line numberDiff line change
@@ -1012,9 +1012,10 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
10121012
display: -webkit-inline-flex;
10131013
display: -ms-inline-flexbox;
10141014
display: inline-flex;
1015-
-webkit-box-pack: justify;
1016-
-webkit-justify-content: space-between;
1017-
justify-content: space-between;
1015+
-webkit-box-pack: center;
1016+
-ms-flex-pack: center;
1017+
-webkit-justify-content: center;
1018+
justify-content: center;
10181019
-webkit-align-items: center;
10191020
-webkit-box-align: center;
10201021
-ms-flex-align: center;
@@ -1442,7 +1443,7 @@ html:not(.src-focus-disabled) .emotion-7:focus {
14421443
>
14431444
<path
14441445
clipRule="evenodd"
1445-
d="M1 12.956h18.274l-7.167 8.575.932.932L23 12.478v-.956l-9.96-9.985-.932.932 7.166 8.575H1v1.912Z"
1446+
d="M1 12.956h18.274l-7.167 8.575.932.932L23 12.478v-.956l-9.96-9.985-.932.932 7.166 8.575H1z"
14461447
fillRule="evenodd"
14471448
/>
14481449
</svg>

client/__tests__/components/identity/__snapshots__/DropMenu.test.tsx.snap

+28-16
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ exports[`DropMenu displays the text in the supplied color 1`] = `
1010
}
1111
1212
.emotion-1 {
13-
font-size: 17px;
14-
font-family: "GuardianTextEgyptian",Georgia,serif;
15-
font-weight: bold;
13+
font-family: GuardianTextEgyptian,"Guardian Text Egyptian Web",Georgia,serif;
14+
font-size: 1.0625rem;
15+
line-height: 1.3;
16+
font-weight: 700;
17+
font-style: normal;
18+
--source-text-decoration-thickness: 2px;
1619
line-height: 24px;
1720
text-transform: capitalize;
1821
display: block;
@@ -39,7 +42,7 @@ exports[`DropMenu displays the text in the supplied color 1`] = `
3942
margin-left: 4px;
4043
}
4144
42-
.emotion-1.open:after {
45+
.emotion-1.open:after: {
4346
-webkit-transform: rotate(225deg);
4447
-moz-transform: rotate(225deg);
4548
-ms-transform: rotate(225deg);
@@ -78,9 +81,12 @@ exports[`DropMenu if closed, opens and shows children on click 1`] = `
7881
}
7982
8083
.emotion-1 {
81-
font-size: 17px;
82-
font-family: "GuardianTextEgyptian",Georgia,serif;
83-
font-weight: bold;
84+
font-family: GuardianTextEgyptian,"Guardian Text Egyptian Web",Georgia,serif;
85+
font-size: 1.0625rem;
86+
line-height: 1.3;
87+
font-weight: 700;
88+
font-style: normal;
89+
--source-text-decoration-thickness: 2px;
8490
line-height: 24px;
8591
text-transform: capitalize;
8692
display: block;
@@ -107,7 +113,7 @@ exports[`DropMenu if closed, opens and shows children on click 1`] = `
107113
margin-left: 4px;
108114
}
109115
110-
.emotion-1.open:after {
116+
.emotion-1.open:after: {
111117
-webkit-transform: rotate(225deg);
112118
-moz-transform: rotate(225deg);
113119
-ms-transform: rotate(225deg);
@@ -150,9 +156,12 @@ exports[`DropMenu if open, closes and hides children on click 1`] = `
150156
}
151157
152158
.emotion-1 {
153-
font-size: 17px;
154-
font-family: "GuardianTextEgyptian",Georgia,serif;
155-
font-weight: bold;
159+
font-family: GuardianTextEgyptian,"Guardian Text Egyptian Web",Georgia,serif;
160+
font-size: 1.0625rem;
161+
line-height: 1.3;
162+
font-weight: 700;
163+
font-style: normal;
164+
--source-text-decoration-thickness: 2px;
156165
line-height: 24px;
157166
text-transform: capitalize;
158167
display: block;
@@ -179,7 +188,7 @@ exports[`DropMenu if open, closes and hides children on click 1`] = `
179188
margin-left: 4px;
180189
}
181190
182-
.emotion-1.open:after {
191+
.emotion-1.open:after: {
183192
-webkit-transform: rotate(225deg);
184193
-moz-transform: rotate(225deg);
185194
-ms-transform: rotate(225deg);
@@ -218,9 +227,12 @@ exports[`DropMenu initalises in the unopened state and displays the title 1`] =
218227
}
219228
220229
.emotion-1 {
221-
font-size: 17px;
222-
font-family: "GuardianTextEgyptian",Georgia,serif;
223-
font-weight: bold;
230+
font-family: GuardianTextEgyptian,"Guardian Text Egyptian Web",Georgia,serif;
231+
font-size: 1.0625rem;
232+
line-height: 1.3;
233+
font-weight: 700;
234+
font-style: normal;
235+
--source-text-decoration-thickness: 2px;
224236
line-height: 24px;
225237
text-transform: capitalize;
226238
display: block;
@@ -247,7 +259,7 @@ exports[`DropMenu initalises in the unopened state and displays the title 1`] =
247259
margin-left: 4px;
248260
}
249261
250-
.emotion-1.open:after {
262+
.emotion-1.open:after: {
251263
-webkit-transform: rotate(225deg);
252264
-moz-transform: rotate(225deg);
253265
-ms-transform: rotate(225deg);

client/__tests__/components/identity/__snapshots__/NewsletterPreference.test.tsx.snap

+32-70
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22

33
exports[`NewsletterPreference component renders correctly and displays marketing information 1`] = `
44
.emotion-0 {
5-
font-size: 14px;
6-
font-family: "Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
7-
line-height: 1.333;
5+
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
6+
font-size: 0.875rem;
7+
line-height: 1.3;
8+
font-weight: 400;
9+
font-style: normal;
10+
--source-text-decoration-thickness: 2px;
11+
lineheight: 1.333;
812
margin-top: 12px;
913
}
1014
@@ -14,17 +18,12 @@ exports[`NewsletterPreference component renders correctly and displays marketing
1418
display: -webkit-flex;
1519
display: -ms-flexbox;
1620
display: flex;
17-
-webkit-align-items: center;
18-
-webkit-box-align: center;
19-
-ms-flex-align: center;
20-
align-items: center;
21-
min-height: 44px;
22-
cursor: pointer;
2321
-webkit-align-items: flex-start;
2422
-webkit-box-align: flex-start;
2523
-ms-flex-align: flex-start;
2624
align-items: flex-start;
27-
margin-bottom: 12px;
25+
padding: 10px 0;
26+
cursor: pointer;
2827
}
2928
3029
.emotion-1:hover input {
@@ -118,7 +117,7 @@ html:not(.src-focus-disabled) .emotion-2:focus {
118117
-moz-transform: rotate(45deg);
119118
-ms-transform: rotate(45deg);
120119
transform: rotate(45deg);
121-
top: 14px;
120+
top: 15px;
122121
left: 9px;
123122
pointer-events: none;
124123
}
@@ -150,19 +149,6 @@ html:not(.src-focus-disabled) .emotion-2:focus {
150149
}
151150
}
152151
153-
@supports ((appearance: none) or (-webkit-appearance: none) or (-moz-appearance: none)) {
154-
.emotion-3 {
155-
top: 15px;
156-
left: 9px;
157-
}
158-
}
159-
160-
@supports ((appearance: none) or (-webkit-appearance: none) or (-moz-appearance: none)) {
161-
.emotion-3 {
162-
top: 5px;
163-
}
164-
}
165-
166152
.emotion-4 {
167153
cursor: pointer;
168154
}
@@ -176,12 +162,6 @@ html:not(.src-focus-disabled) .emotion-2:focus {
176162
--source-text-decoration-thickness: 2px;
177163
color: #121212;
178164
width: 100%;
179-
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
180-
font-size: 1.0625rem;
181-
line-height: 1.3;
182-
font-weight: 400;
183-
font-style: normal;
184-
--source-text-decoration-thickness: 2px;
185165
margin-top: 1px;
186166
}
187167
@@ -190,13 +170,14 @@ html:not(.src-focus-disabled) .emotion-2:focus {
190170
}
191171
192172
.emotion-6 {
193-
font-size: 14px;
194-
font-family: "Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
173+
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
174+
font-size: 0.875rem;
175+
line-height: 1.3;
176+
font-weight: 700;
177+
font-style: normal;
178+
--source-text-decoration-thickness: 2px;
195179
cursor: pointer;
196-
font-size: 14px;
197180
line-height: 22px;
198-
font-family: "Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
199-
font-weight: bold;
200181
margin: 0;
201182
}
202183
@@ -302,9 +283,13 @@ html:not(.src-focus-disabled) .emotion-2:focus {
302283

303284
exports[`NewsletterPreference component will select the checkbox when the selected prop is passed 1`] = `
304285
.emotion-0 {
305-
font-size: 14px;
306-
font-family: "Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
307-
line-height: 1.333;
286+
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
287+
font-size: 0.875rem;
288+
line-height: 1.3;
289+
font-weight: 400;
290+
font-style: normal;
291+
--source-text-decoration-thickness: 2px;
292+
lineheight: 1.333;
308293
margin-top: 12px;
309294
}
310295
@@ -314,17 +299,12 @@ exports[`NewsletterPreference component will select the checkbox when the select
314299
display: -webkit-flex;
315300
display: -ms-flexbox;
316301
display: flex;
317-
-webkit-align-items: center;
318-
-webkit-box-align: center;
319-
-ms-flex-align: center;
320-
align-items: center;
321-
min-height: 44px;
322-
cursor: pointer;
323302
-webkit-align-items: flex-start;
324303
-webkit-box-align: flex-start;
325304
-ms-flex-align: flex-start;
326305
align-items: flex-start;
327-
margin-bottom: 12px;
306+
padding: 10px 0;
307+
cursor: pointer;
328308
}
329309
330310
.emotion-1:hover input {
@@ -418,7 +398,7 @@ html:not(.src-focus-disabled) .emotion-2:focus {
418398
-moz-transform: rotate(45deg);
419399
-ms-transform: rotate(45deg);
420400
transform: rotate(45deg);
421-
top: 14px;
401+
top: 15px;
422402
left: 9px;
423403
pointer-events: none;
424404
}
@@ -450,19 +430,6 @@ html:not(.src-focus-disabled) .emotion-2:focus {
450430
}
451431
}
452432
453-
@supports ((appearance: none) or (-webkit-appearance: none) or (-moz-appearance: none)) {
454-
.emotion-3 {
455-
top: 15px;
456-
left: 9px;
457-
}
458-
}
459-
460-
@supports ((appearance: none) or (-webkit-appearance: none) or (-moz-appearance: none)) {
461-
.emotion-3 {
462-
top: 5px;
463-
}
464-
}
465-
466433
.emotion-4 {
467434
cursor: pointer;
468435
}
@@ -476,12 +443,6 @@ html:not(.src-focus-disabled) .emotion-2:focus {
476443
--source-text-decoration-thickness: 2px;
477444
color: #121212;
478445
width: 100%;
479-
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
480-
font-size: 1.0625rem;
481-
line-height: 1.3;
482-
font-weight: 400;
483-
font-style: normal;
484-
--source-text-decoration-thickness: 2px;
485446
margin-top: 1px;
486447
}
487448
@@ -490,13 +451,14 @@ html:not(.src-focus-disabled) .emotion-2:focus {
490451
}
491452
492453
.emotion-6 {
493-
font-size: 14px;
494-
font-family: "Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
454+
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
455+
font-size: 0.875rem;
456+
line-height: 1.3;
457+
font-weight: 700;
458+
font-style: normal;
459+
--source-text-decoration-thickness: 2px;
495460
cursor: pointer;
496-
font-size: 14px;
497461
line-height: 22px;
498-
font-family: "Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
499-
font-weight: bold;
500462
margin: 0;
501463
}
502464

0 commit comments

Comments
 (0)