Skip to content

Commit d2d12cc

Browse files
committed
test: update snapshots after base form control emotion conversion
1 parent aca674b commit d2d12cc

19 files changed

Lines changed: 80 additions & 6 deletions

File tree

packages/eui/src/components/color_picker/__snapshots__/color_picker.test.tsx.snap

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ exports[`renders EuiColorPicker 1`] = `
99
>
1010
<div
1111
class="euiFormControlLayout__childrenWrapper"
12+
style="--euiFormControlLeftIconsCount: 1; --euiFormControlRightIconsCount: 1;"
1213
>
1314
<div
1415
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -59,6 +60,7 @@ exports[`renders EuiColorPicker with a clearable input 1`] = `
5960
>
6061
<div
6162
class="euiFormControlLayout__childrenWrapper"
63+
style="--euiFormControlLeftIconsCount: 1; --euiFormControlRightIconsCount: 2;"
6264
>
6365
<div
6466
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -119,6 +121,7 @@ exports[`renders EuiColorPicker with a color swatch when color is defined 1`] =
119121
>
120122
<div
121123
class="euiFormControlLayout__childrenWrapper"
124+
style="--euiFormControlLeftIconsCount: 1; --euiFormControlRightIconsCount: 1;"
122125
>
123126
<div
124127
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -169,6 +172,7 @@ exports[`renders EuiColorPicker with a custom placeholder 1`] = `
169172
>
170173
<div
171174
class="euiFormControlLayout__childrenWrapper"
175+
style="--euiFormControlLeftIconsCount: 1; --euiFormControlRightIconsCount: 1;"
172176
>
173177
<div
174178
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -220,6 +224,7 @@ exports[`renders EuiColorPicker with an empty swatch when color is "" 1`] = `
220224
>
221225
<div
222226
class="euiFormControlLayout__childrenWrapper"
227+
style="--euiFormControlLeftIconsCount: 1; --euiFormControlRightIconsCount: 1;"
223228
>
224229
<div
225230
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -271,6 +276,7 @@ exports[`renders EuiColorPicker with an empty swatch when color is null 1`] = `
271276
>
272277
<div
273278
class="euiFormControlLayout__childrenWrapper"
279+
style="--euiFormControlLeftIconsCount: 1; --euiFormControlRightIconsCount: 1;"
274280
>
275281
<div
276282
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -327,6 +333,7 @@ exports[`renders a EuiColorPicker with a prepend and append 1`] = `
327333
</label>
328334
<div
329335
class="euiFormControlLayout__childrenWrapper"
336+
style="--euiFormControlLeftIconsCount: 1; --euiFormControlRightIconsCount: 1;"
330337
>
331338
<div
332339
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -382,6 +389,7 @@ exports[`renders a EuiColorPicker with an alpha range selector 1`] = `
382389
>
383390
<div
384391
class="euiFormControlLayout__childrenWrapper"
392+
style="--euiFormControlLeftIconsCount: 1; --euiFormControlRightIconsCount: 1;"
385393
>
386394
<div
387395
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -432,6 +440,7 @@ exports[`renders compressed EuiColorPicker 1`] = `
432440
>
433441
<div
434442
class="euiFormControlLayout__childrenWrapper"
443+
style="--euiFormControlLeftIconsCount: 1; --euiFormControlRightIconsCount: 1;"
435444
>
436445
<div
437446
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -482,6 +491,7 @@ exports[`renders disabled EuiColorPicker 1`] = `
482491
>
483492
<div
484493
class="euiFormControlLayout__childrenWrapper"
494+
style="--euiFormControlLeftIconsCount: 1;"
485495
>
486496
<div
487497
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -520,6 +530,7 @@ exports[`renders fullWidth EuiColorPicker 1`] = `
520530
>
521531
<div
522532
class="euiFormControlLayout__childrenWrapper"
533+
style="--euiFormControlLeftIconsCount: 1; --euiFormControlRightIconsCount: 1;"
523534
>
524535
<div
525536
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -742,6 +753,7 @@ exports[`renders readOnly EuiColorPicker 1`] = `
742753
>
743754
<div
744755
class="euiFormControlLayout__childrenWrapper"
756+
style="--euiFormControlLeftIconsCount: 1;"
745757
>
746758
<div
747759
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"

packages/eui/src/components/color_picker/color_palette_picker/__snapshots__/color_palette_picker.test.tsx.snap

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ exports[`EuiColorPalettePicker is rendered 1`] = `
1313
>
1414
<div
1515
class="euiFormControlLayout__childrenWrapper"
16+
style="--euiFormControlRightIconsCount: 1;"
1617
>
1718
<button
1819
aria-haspopup="listbox"
@@ -52,6 +53,7 @@ exports[`EuiColorPalettePicker is rendered with a selected custom text 1`] = `
5253
>
5354
<div
5455
class="euiFormControlLayout__childrenWrapper"
56+
style="--euiFormControlRightIconsCount: 1;"
5557
>
5658
<button
5759
aria-haspopup="listbox"
@@ -93,6 +95,7 @@ exports[`EuiColorPalettePicker is rendered with a selected fixed palette 1`] = `
9395
>
9496
<div
9597
class="euiFormControlLayout__childrenWrapper"
98+
style="--euiFormControlRightIconsCount: 1;"
9699
>
97100
<button
98101
aria-haspopup="listbox"
@@ -162,6 +165,7 @@ exports[`EuiColorPalettePicker is rendered with a selected gradient palette 1`]
162165
>
163166
<div
164167
class="euiFormControlLayout__childrenWrapper"
168+
style="--euiFormControlRightIconsCount: 1;"
165169
>
166170
<button
167171
aria-haspopup="listbox"
@@ -211,6 +215,7 @@ exports[`EuiColorPalettePicker is rendered with a selected gradient palette with
211215
>
212216
<div
213217
class="euiFormControlLayout__childrenWrapper"
218+
style="--euiFormControlRightIconsCount: 1;"
214219
>
215220
<button
216221
aria-haspopup="listbox"
@@ -260,6 +265,7 @@ exports[`EuiColorPalettePicker is rendered with the prop selectionDisplay set as
260265
>
261266
<div
262267
class="euiFormControlLayout__childrenWrapper"
268+
style="--euiFormControlRightIconsCount: 1;"
263269
>
264270
<button
265271
aria-haspopup="listbox"
@@ -301,6 +307,7 @@ exports[`EuiColorPalettePicker more props are propagated to each option 1`] = `
301307
>
302308
<div
303309
class="euiFormControlLayout__childrenWrapper"
310+
style="--euiFormControlRightIconsCount: 1;"
304311
>
305312
<button
306313
aria-haspopup="listbox"

packages/eui/src/components/combo_box/__snapshots__/combo_box.test.tsx.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ exports[`EuiComboBox renders 1`] = `
1313
>
1414
<div
1515
class="euiFormControlLayout__childrenWrapper"
16+
style="--euiFormControlRightIconsCount: 1;"
1617
>
1718
<div
1819
class="euiComboBox__inputWrap euiFormControlLayout--1icons"
@@ -71,6 +72,7 @@ exports[`EuiComboBox renders the options list dropdown 1`] = `
7172
>
7273
<div
7374
class="euiFormControlLayout__childrenWrapper"
75+
style="--euiFormControlRightIconsCount: 1;"
7476
>
7577
<div
7678
class="euiComboBox__inputWrap euiFormControlLayout--1icons"

packages/eui/src/components/date_picker/__snapshots__/date_picker.test.tsx.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,7 @@ exports[`EuiDatePicker renders 1`] = `
941941
>
942942
<div
943943
class="euiFormControlLayout__childrenWrapper"
944+
style="--euiFormControlLeftIconsCount: 1;"
944945
>
945946
<div
946947
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"

packages/eui/src/components/date_picker/super_date_picker/quick_select_popover/__snapshots__/quick_select_popover.test.tsx.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ exports[`EuiQuickSelectPanels customQuickSelectPanels should render custom panel
9090
>
9191
<div
9292
class="euiFormControlLayout__childrenWrapper"
93+
style="--euiFormControlRightIconsCount: 1;"
9394
>
9495
<select
9596
aria-describedby="generated-id generated-id"
@@ -151,6 +152,7 @@ exports[`EuiQuickSelectPanels customQuickSelectPanels should render custom panel
151152
>
152153
<div
153154
class="euiFormControlLayout__childrenWrapper"
155+
style="--euiFormControlRightIconsCount: 1;"
154156
>
155157
<select
156158
aria-describedby="generated-id generated-id"

packages/eui/src/components/form/field_password/__snapshots__/field_password.test.tsx.snap

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ exports[`EuiFieldPassword is rendered 1`] = `
66
>
77
<div
88
class="euiFormControlLayout__childrenWrapper"
9+
style="--euiFormControlLeftIconsCount: 1;"
910
>
1011
<div
1112
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -42,6 +43,7 @@ exports[`EuiFieldPassword props compressed is rendered 1`] = `
4243
>
4344
<div
4445
class="euiFormControlLayout__childrenWrapper"
46+
style="--euiFormControlLeftIconsCount: 1;"
4547
>
4648
<div
4749
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -73,6 +75,7 @@ exports[`EuiFieldPassword props dual dual type also renders append 1`] = `
7375
>
7476
<div
7577
class="euiFormControlLayout__childrenWrapper"
78+
style="--euiFormControlLeftIconsCount: 1;"
7679
>
7780
<div
7881
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -127,6 +130,7 @@ exports[`EuiFieldPassword props dual dualToggleProps is rendered 1`] = `
127130
>
128131
<div
129132
class="euiFormControlLayout__childrenWrapper"
133+
style="--euiFormControlLeftIconsCount: 1;"
130134
>
131135
<div
132136
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -172,6 +176,7 @@ exports[`EuiFieldPassword props fullWidth is rendered 1`] = `
172176
>
173177
<div
174178
class="euiFormControlLayout__childrenWrapper"
179+
style="--euiFormControlLeftIconsCount: 1;"
175180
>
176181
<div
177182
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -203,6 +208,7 @@ exports[`EuiFieldPassword props isInvalid is rendered 1`] = `
203208
>
204209
<div
205210
class="euiFormControlLayout__childrenWrapper"
211+
style="--euiFormControlLeftIconsCount: 1; --euiFormControlRightIconsCount: 1;"
206212
>
207213
<div
208214
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -244,6 +250,7 @@ exports[`EuiFieldPassword props isLoading is rendered 1`] = `
244250
>
245251
<div
246252
class="euiFormControlLayout__childrenWrapper"
253+
style="--euiFormControlLeftIconsCount: 1; --euiFormControlRightIconsCount: 1;"
247254
>
248255
<div
249256
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -289,6 +296,7 @@ exports[`EuiFieldPassword props prepend and append is rendered 1`] = `
289296
</label>
290297
<div
291298
class="euiFormControlLayout__childrenWrapper"
299+
style="--euiFormControlLeftIconsCount: 1;"
292300
>
293301
<div
294302
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -325,6 +333,7 @@ exports[`EuiFieldPassword props type dual is rendered 1`] = `
325333
>
326334
<div
327335
class="euiFormControlLayout__childrenWrapper"
336+
style="--euiFormControlLeftIconsCount: 1;"
328337
>
329338
<div
330339
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -369,6 +378,7 @@ exports[`EuiFieldPassword props type password is rendered 1`] = `
369378
>
370379
<div
371380
class="euiFormControlLayout__childrenWrapper"
381+
style="--euiFormControlLeftIconsCount: 1;"
372382
>
373383
<div
374384
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -400,6 +410,7 @@ exports[`EuiFieldPassword props type text is rendered 1`] = `
400410
>
401411
<div
402412
class="euiFormControlLayout__childrenWrapper"
413+
style="--euiFormControlLeftIconsCount: 1;"
403414
>
404415
<div
405416
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"

packages/eui/src/components/form/form.styles.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ describe('euiFormControlStyles', () => {
7979
it('outputs an object of control states and modifiers', () => {
8080
const { result } = renderHook(() => euiFormControlStyles(useEuiTheme()));
8181
expect(result.current).toMatchInlineSnapshot(`
82-
Object {
82+
{
8383
"autoFill": "
8484
&:-webkit-autofill {
8585
-webkit-text-fill-color: #343741;

packages/eui/src/components/form/form_control_layout/__snapshots__/form_control_layout.test.tsx.snap

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ exports[`EuiFormControlLayout props clear onClick is rendered 1`] = `
2020
>
2121
<div
2222
class="euiFormControlLayout__childrenWrapper"
23+
style="--euiFormControlRightIconsCount: 1;"
2324
>
2425
<div
2526
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--right euiFormControlLayoutIcons--absolute"
@@ -46,6 +47,7 @@ exports[`EuiFormControlLayout props compressed renders small-sized icon, clear b
4647
>
4748
<div
4849
class="euiFormControlLayout__childrenWrapper"
50+
style="--euiFormControlLeftIconsCount: 1; --euiFormControlRightIconsCount: 2;"
4951
>
5052
<div
5153
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -99,6 +101,7 @@ exports[`EuiFormControlLayout props icon is rendered as a string 1`] = `
99101
>
100102
<div
101103
class="euiFormControlLayout__childrenWrapper"
104+
style="--euiFormControlLeftIconsCount: 1;"
102105
>
103106
<div
104107
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -123,6 +126,7 @@ exports[`EuiFormControlLayout props icon is rendered as an object 1`] = `
123126
>
124127
<div
125128
class="euiFormControlLayout__childrenWrapper"
129+
style="--euiFormControlLeftIconsCount: 1;"
126130
>
127131
<div
128132
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -148,6 +152,7 @@ exports[`EuiFormControlLayout props icon side left is rendered 1`] = `
148152
>
149153
<div
150154
class="euiFormControlLayout__childrenWrapper"
155+
style="--euiFormControlLeftIconsCount: 1;"
151156
>
152157
<div
153158
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--left euiFormControlLayoutIcons--absolute"
@@ -172,6 +177,7 @@ exports[`EuiFormControlLayout props icon side right is rendered 1`] = `
172177
>
173178
<div
174179
class="euiFormControlLayout__childrenWrapper"
180+
style="--euiFormControlRightIconsCount: 1;"
175181
>
176182
<div
177183
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--right euiFormControlLayoutIcons--absolute"
@@ -235,6 +241,7 @@ exports[`EuiFormControlLayout props isDropdown is rendered 1`] = `
235241
>
236242
<div
237243
class="euiFormControlLayout__childrenWrapper"
244+
style="--euiFormControlRightIconsCount: 1;"
238245
>
239246
<div
240247
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--right euiFormControlLayoutIcons--absolute"
@@ -259,6 +266,7 @@ exports[`EuiFormControlLayout props isInvalid is rendered 1`] = `
259266
>
260267
<div
261268
class="euiFormControlLayout__childrenWrapper"
269+
style="--euiFormControlRightIconsCount: 1;"
262270
>
263271
<div
264272
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--right euiFormControlLayoutIcons--absolute"
@@ -278,6 +286,7 @@ exports[`EuiFormControlLayout props isLoading is rendered 1`] = `
278286
>
279287
<div
280288
class="euiFormControlLayout__childrenWrapper"
289+
style="--euiFormControlRightIconsCount: 1;"
281290
>
282291
<div
283292
class="euiFormControlLayoutIcons euiFormControlLayoutIcons--right euiFormControlLayoutIcons--absolute"

packages/eui/src/components/form/form_control_layout/_num_icons.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe('getIconAffordanceStyles', () => {
4141
test('all icons', () => {
4242
const styles = getIconAffordanceStyles(allIcons);
4343
expect(styles).toMatchInlineSnapshot(`
44-
Object {
44+
{
4545
"--euiFormControlRightIconsCount": 5,
4646
}
4747
`);
@@ -53,7 +53,7 @@ describe('getIconAffordanceStyles', () => {
5353
isInvalid: true,
5454
});
5555
expect(styles).toMatchInlineSnapshot(`
56-
Object {
56+
{
5757
"--euiFormControlRightIconsCount": 2,
5858
}
5959
`);
@@ -64,7 +64,7 @@ describe('getIconAffordanceStyles', () => {
6464
icon: 'search',
6565
});
6666
expect(styles).toMatchInlineSnapshot(`
67-
Object {
67+
{
6868
"--euiFormControlLeftIconsCount": 1,
6969
}
7070
`);

0 commit comments

Comments
 (0)