Skip to content

Commit 1a01f03

Browse files
committed
fix snapshots
1 parent 4d838da commit 1a01f03

File tree

1 file changed

+59
-59
lines changed

1 file changed

+59
-59
lines changed

packages/@react-spectrum/s2/style/__tests__/style-macro.test.js

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,22 @@ describe('style-macro', () => {
4040
"@layer _.a, _.b, _.c;
4141
4242
@layer _.b {
43-
.Jbs12:first-child {
43+
.Jbs1:first-child {
4444
margin-top: 0.25rem;
4545
}
4646
}
4747
4848
@layer _.c.p {
4949
@media (min-width: 64rem) {
50-
.Jbpv12:first-child {
50+
.Jbpv1:first-child {
5151
margin-top: 0.5rem;
5252
}
5353
}
5454
}
5555
5656
"
5757
`);
58-
expect(js).toMatchInlineSnapshot('" Jbs12 Jbpv12"');
58+
expect(js).toMatchInlineSnapshot('" Jbs1 Jbpv1"');
5959
});
6060

6161
it('should support self references', () => {
@@ -69,55 +69,55 @@ describe('style-macro', () => {
6969
"@layer _.a;
7070
7171
@layer _.a {
72-
._kc12 {
72+
._kc1 {
7373
border-top-width: 2px;
7474
}
7575
7676
77-
.hc12 {
77+
.hc1 {
7878
border-bottom-width: 2px;
7979
}
8080
8181
82-
.mCPFGYc12 {
82+
.mCPFGYc1 {
8383
border-inline-start-width: var(--m);
8484
}
8585
8686
87-
.lc12 {
87+
.lc1 {
8888
border-inline-end-width: 2px;
8989
}
9090
9191
92-
.SMBFGYc12 {
92+
.SMBFGYc1 {
9393
padding-inline-start: var(--S);
9494
}
9595
9696
97-
.Rv12 {
97+
.Rv1 {
9898
padding-inline-end: calc(var(--F, var(--M)) * 3 / 8);
9999
}
100100
101101
102-
.ZjUQgKd12 {
102+
.ZjUQgKd1 {
103103
width: calc(200px - var(--m) - var(--S));
104104
}
105105
106106
107-
.-m_-mc12 {
107+
.-m_-mc1 {
108108
--m: 2px;
109109
}
110110
111111
112-
.-S_-Sv12 {
112+
.-S_-Sv1 {
113113
--S: calc(var(--F, var(--M)) * 3 / 8);
114114
}
115115
}
116116
117117
"
118118
`);
119119

120-
expect(js).toMatchInlineSnapshot('" _kc12 hc12 mCPFGYc12 lc12 SMBFGYc12 Rv12 ZjUQgKd12 -m_-mc12 -S_-Sv12"');
120+
expect(js).toMatchInlineSnapshot('" _kc1 hc1 mCPFGYc1 lc1 SMBFGYc1 Rv1 ZjUQgKd1 -m_-mc1 -S_-Sv1"');
121121
});
122122

123123
it('should support allowed overrides', () => {
@@ -134,9 +134,9 @@ describe('style-macro', () => {
134134
color: 'green-400'
135135
});
136136

137-
expect(js()).toMatchInlineSnapshot('" gw12 pg12"');
138-
expect(overrides).toMatchInlineSnapshot('" g8tmWqb12 pHJ3AUd12"');
139-
expect(js({}, overrides)).toMatchInlineSnapshot('" g8tmWqb12 pg12"');
137+
expect(js()).toMatchInlineSnapshot('" gw1 pg1"');
138+
expect(overrides).toMatchInlineSnapshot('" g8tmWqb1 pHJ3AUd1"');
139+
expect(js({}, overrides)).toMatchInlineSnapshot('" g8tmWqb1 pg1"');
140140
});
141141

142142
it('should support allowed overrides for properties that expand into multiple', () => {
@@ -151,9 +151,9 @@ describe('style-macro', () => {
151151
translateX: 40
152152
});
153153

154-
expect(js()).toMatchInlineSnapshot('" -_7PloMd-B12 __Ya12"');
155-
expect(overrides).toMatchInlineSnapshot('" -_7PloMd-D12 __Ya12"');
156-
expect(js({}, overrides)).toMatchInlineSnapshot('" -_7PloMd-D12 __Ya12"');
154+
expect(js()).toMatchInlineSnapshot('" -_7PloMd-B1 __Ya1"');
155+
expect(overrides).toMatchInlineSnapshot('" -_7PloMd-D1 __Ya1"');
156+
expect(js({}, overrides)).toMatchInlineSnapshot('" -_7PloMd-D1 __Ya1"');
157157
});
158158

159159
it('should support allowed overrides for shorthands', () => {
@@ -168,9 +168,9 @@ describe('style-macro', () => {
168168
padding: 40
169169
});
170170

171-
expect(js()).toMatchInlineSnapshot('" Tk12 Qk12 Sk12 Rk12"');
172-
expect(overrides).toMatchInlineSnapshot('" Tm12 Qm12 Sm12 Rm12"');
173-
expect(js({}, overrides)).toMatchInlineSnapshot('" Tm12 Qm12 Sm12 Rm12"');
171+
expect(js()).toMatchInlineSnapshot('" Tk1 Qk1 Sk1 Rk1"');
172+
expect(overrides).toMatchInlineSnapshot('" Tm1 Qm1 Sm1 Rm1"');
173+
expect(js({}, overrides)).toMatchInlineSnapshot('" Tm1 Qm1 Sm1 Rm1"');
174174
});
175175

176176
it('should support allowed overrides for fontSize', () => {
@@ -185,9 +185,9 @@ describe('style-macro', () => {
185185
fontSize: 'ui-xs'
186186
});
187187

188-
expect(js()).toMatchInlineSnapshot('" -_6BNtrc-woabcc12 vx12"');
189-
expect(overrides).toMatchInlineSnapshot('" -_6BNtrc-a12 vx12"');
190-
expect(js({}, overrides)).toMatchInlineSnapshot('" -_6BNtrc-a12 vx12"');
188+
expect(js()).toMatchInlineSnapshot('" -_6BNtrc-woabcc1 vx1"');
189+
expect(overrides).toMatchInlineSnapshot('" -_6BNtrc-a1 vx1"');
190+
expect(js({}, overrides)).toMatchInlineSnapshot('" -_6BNtrc-a1 vx1"');
191191
});
192192

193193
it("should support allowed overrides for values that aren't defined", () => {
@@ -202,9 +202,9 @@ describe('style-macro', () => {
202202
minWidth: 32
203203
});
204204

205-
expect(js()).toMatchInlineSnapshot('" gE12"');
206-
expect(overrides).toMatchInlineSnapshot('" Nk12"');
207-
expect(js({}, overrides)).toMatchInlineSnapshot('" Nk12 gE12"');
205+
expect(js()).toMatchInlineSnapshot('" gE1"');
206+
expect(overrides).toMatchInlineSnapshot('" Nk1"');
207+
expect(js({}, overrides)).toMatchInlineSnapshot('" Nk1 gE1"');
208208
});
209209

210210
it('should support runtime conditions', () => {
@@ -225,42 +225,42 @@ describe('style-macro', () => {
225225
"@layer _.a;
226226
227227
@layer _.a {
228-
.gH12 {
228+
.gH1 {
229229
background-color: light-dark(rgb(233, 233, 233), rgb(44, 44, 44));
230230
}
231231
232232
233-
.gF12 {
233+
.gF1 {
234234
background-color: light-dark(rgb(225, 225, 225), rgb(50, 50, 50));
235235
}
236236
237237
238-
.gE12 {
238+
.gE1 {
239239
background-color: light-dark(rgb(218, 218, 218), rgb(57, 57, 57));
240240
}
241241
242242
243-
.pt12 {
243+
.pt1 {
244244
color: light-dark(rgb(41, 41, 41), rgb(219, 219, 219));
245245
}
246246
247247
248-
.po12 {
248+
.po1 {
249249
color: light-dark(rgb(19, 19, 19), rgb(242, 242, 242));
250250
}
251251
252252
253-
.pm12 {
253+
.pm1 {
254254
color: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));
255255
}
256256
}
257257
258258
"
259259
`);
260260

261-
expect(js({})).toMatchInlineSnapshot('" gH12 pt12"');
262-
expect(js({isHovered: true})).toMatchInlineSnapshot('" gF12 po12"');
263-
expect(js({isPressed: true})).toMatchInlineSnapshot('" gE12 pm12"');
261+
expect(js({})).toMatchInlineSnapshot('" gH1 pt1"');
262+
expect(js({isHovered: true})).toMatchInlineSnapshot('" gF1 po1"');
263+
expect(js({isPressed: true})).toMatchInlineSnapshot('" gE1 pm1"');
264264
});
265265

266266
it('should support nested runtime conditions', () => {
@@ -279,32 +279,32 @@ describe('style-macro', () => {
279279
"@layer _.a;
280280
281281
@layer _.a {
282-
.gH12 {
282+
.gH1 {
283283
background-color: light-dark(rgb(233, 233, 233), rgb(44, 44, 44));
284284
}
285285
286286
287-
.gF12 {
287+
.gF1 {
288288
background-color: light-dark(rgb(225, 225, 225), rgb(50, 50, 50));
289289
}
290290
291291
292-
.g_h12 {
292+
.g_h1 {
293293
background-color: light-dark(rgb(75, 117, 255), rgb(64, 105, 253));
294294
}
295295
296296
297-
.g312 {
297+
.g31 {
298298
background-color: light-dark(rgb(59, 99, 251), rgb(86, 129, 255));
299299
}
300300
}
301301
302302
"
303303
`);
304-
expect(js({})).toMatchInlineSnapshot('" gH12"');
305-
expect(js({isHovered: true})).toMatchInlineSnapshot('" gF12"');
306-
expect(js({isSelected: true})).toMatchInlineSnapshot('" g_h12"');
307-
expect(js({isSelected: true, isHovered: true})).toMatchInlineSnapshot('" g312"');
304+
expect(js({})).toMatchInlineSnapshot('" gH1"');
305+
expect(js({isHovered: true})).toMatchInlineSnapshot('" gF1"');
306+
expect(js({isSelected: true})).toMatchInlineSnapshot('" g_h1"');
307+
expect(js({isSelected: true, isHovered: true})).toMatchInlineSnapshot('" g31"');
308308
});
309309

310310
it('should support variant runtime conditions', () => {
@@ -318,9 +318,9 @@ describe('style-macro', () => {
318318
}
319319
});
320320

321-
expect(js({variant: 'accent'})).toMatchInlineSnapshot('" gY12"');
322-
expect(js({variant: 'primary'})).toMatchInlineSnapshot('" gjQquMe12"');
323-
expect(js({variant: 'secondary'})).toMatchInlineSnapshot('" gw12"');
321+
expect(js({variant: 'accent'})).toMatchInlineSnapshot('" gY1"');
322+
expect(js({variant: 'primary'})).toMatchInlineSnapshot('" gjQquMe1"');
323+
expect(js({variant: 'secondary'})).toMatchInlineSnapshot('" gw1"');
324324
});
325325

326326
it('supports runtime conditions nested inside css conditions', () => {
@@ -338,14 +338,14 @@ describe('style-macro', () => {
338338
339339
@layer _.b.l {
340340
@media (forced-colors: active) {
341-
.plb12 {
341+
.plb1 {
342342
color: ButtonText;
343343
}
344344
}
345345
346346
347347
@media (forced-colors: active) {
348-
.ple12 {
348+
.ple1 {
349349
color: HighlightText;
350350
}
351351
}
@@ -354,36 +354,36 @@ describe('style-macro', () => {
354354
"
355355
`);
356356

357-
expect(js({})).toMatchInlineSnapshot('" plb12"');
358-
expect(js({isSelected: true})).toMatchInlineSnapshot('" ple12"');
357+
expect(js({})).toMatchInlineSnapshot('" plb1"');
358+
expect(js({isSelected: true})).toMatchInlineSnapshot('" ple1"');
359359
});
360360

361361
it('should expand shorthand properties to longhands', () => {
362362
let {js, css} = testStyle({
363363
padding: 24
364364
});
365365

366-
expect(js).toMatchInlineSnapshot('" Th12 Qh12 Sh12 Rh12"');
366+
expect(js).toMatchInlineSnapshot('" Th1 Qh1 Sh1 Rh1"');
367367
expect(css).toMatchInlineSnapshot(`
368368
"@layer _.a;
369369
370370
@layer _.a {
371-
.Th12 {
371+
.Th1 {
372372
padding-top: 24px;
373373
}
374374
375375
376-
.Qh12 {
376+
.Qh1 {
377377
padding-bottom: 24px;
378378
}
379379
380380
381-
.Sh12 {
381+
.Sh1 {
382382
padding-inline-start: 24px;
383383
}
384384
385385
386-
.Rh12 {
386+
.Rh1 {
387387
padding-inline-end: 24px;
388388
}
389389
}
@@ -401,7 +401,7 @@ describe('style-macro', () => {
401401
"@layer _.a;
402402
403403
@layer _.a {
404-
.gpQzfVb12 {
404+
.gpQzfVb1 {
405405
background-color: rgb(from light-dark(rgb(39, 77, 234), rgb(105, 149, 254)) r g b / 50%);
406406
}
407407
}
@@ -422,7 +422,7 @@ describe('style-macro', () => {
422422
"@layer _.a;
423423
424424
@layer _.a {
425-
.-FUeYm-gE12 {
425+
.-FUeYm-gE1 {
426426
--foo: light-dark(rgb(218, 218, 218), rgb(57, 57, 57));
427427
}
428428
}

0 commit comments

Comments
 (0)