Skip to content

Commit 608e704

Browse files
committed
test: update tests due to changes in styles of input and suggestion
1 parent af27971 commit 608e704

11 files changed

Lines changed: 5129 additions & 4291 deletions

File tree

packages/web/src/components/basic/__snapshots__/ErrorBoundary.test.js.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ exports[`should handle error with componentIds passed 1`] = `
2424
.emotion-4 {
2525
width: 100%;
2626
line-height: 1.5;
27+
min-height: 42px;
2728
padding: 8px 12px;
2829
border: 1px solid #ccc;
2930
background-color: #fafafa;

packages/web/src/components/list/__snapshots__/MultiDropdownList.test.js.snap

Lines changed: 49 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ exports[`should not render search/ count when showSearch/ showCount are false 1`
106106
margin: 0;
107107
padding: 0;
108108
list-style: none;
109-
max-height: 375px;
109+
max-height: min(100vh,402px);
110110
overflow-y: auto;
111111
}
112112
@@ -131,7 +131,17 @@ exports[`should not render search/ count when showSearch/ showCount are false 1`
131131
user-select: none;
132132
}
133133
134-
.emotion-9 li .trim {
134+
.emotion-9 li>.trim {
135+
display: -webkit-box;
136+
display: -webkit-box;
137+
display: -webkit-flex;
138+
display: -ms-flexbox;
139+
display: flex;
140+
width: 100%;
141+
max-height: 2.3rem;
142+
line-height: 1.2rem;
143+
-webkit-line-clamp: 2;
144+
-webkit-box-orient: vertical;
135145
overflow: hidden;
136146
text-overflow: ellipsis;
137147
white-space: nowrap;
@@ -331,7 +341,7 @@ exports[`should render list of items 1`] = `
331341
margin: 0;
332342
padding: 0;
333343
list-style: none;
334-
max-height: 375px;
344+
max-height: min(100vh,402px);
335345
overflow-y: auto;
336346
}
337347
@@ -356,7 +366,17 @@ exports[`should render list of items 1`] = `
356366
user-select: none;
357367
}
358368
359-
.emotion-9 li .trim {
369+
.emotion-9 li>.trim {
370+
display: -webkit-box;
371+
display: -webkit-box;
372+
display: -webkit-flex;
373+
display: -ms-flexbox;
374+
display: flex;
375+
width: 100%;
376+
max-height: 2.3rem;
377+
line-height: 1.2rem;
378+
-webkit-line-clamp: 2;
379+
-webkit-box-orient: vertical;
360380
overflow: hidden;
361381
text-overflow: ellipsis;
362382
white-space: nowrap;
@@ -595,7 +615,7 @@ exports[`should render search/count when showSearch/showCount are true 1`] = `
595615
margin: 0;
596616
padding: 0;
597617
list-style: none;
598-
max-height: 375px;
618+
max-height: min(100vh,402px);
599619
overflow-y: auto;
600620
}
601621
@@ -620,7 +640,17 @@ exports[`should render search/count when showSearch/showCount are true 1`] = `
620640
user-select: none;
621641
}
622642
623-
.emotion-9 li .trim {
643+
.emotion-9 li>.trim {
644+
display: -webkit-box;
645+
display: -webkit-box;
646+
display: -webkit-flex;
647+
display: -ms-flexbox;
648+
display: flex;
649+
width: 100%;
650+
max-height: 2.3rem;
651+
line-height: 1.2rem;
652+
-webkit-line-clamp: 2;
653+
-webkit-box-orient: vertical;
624654
overflow: hidden;
625655
text-overflow: ellipsis;
626656
white-space: nowrap;
@@ -634,6 +664,7 @@ exports[`should render search/count when showSearch/showCount are true 1`] = `
634664
.emotion-10 {
635665
width: 100%;
636666
line-height: 1.5;
667+
min-height: 42px;
637668
padding: 8px 12px;
638669
border: 1px solid #ccc;
639670
background-color: #fafafa;
@@ -1064,7 +1095,7 @@ exports[`should use renderItem to render the list item 1`] = `
10641095
margin: 0;
10651096
padding: 0;
10661097
list-style: none;
1067-
max-height: 375px;
1098+
max-height: min(100vh,402px);
10681099
overflow-y: auto;
10691100
}
10701101
@@ -1089,7 +1120,17 @@ exports[`should use renderItem to render the list item 1`] = `
10891120
user-select: none;
10901121
}
10911122
1092-
.emotion-9 li .trim {
1123+
.emotion-9 li>.trim {
1124+
display: -webkit-box;
1125+
display: -webkit-box;
1126+
display: -webkit-flex;
1127+
display: -ms-flexbox;
1128+
display: flex;
1129+
width: 100%;
1130+
max-height: 2.3rem;
1131+
line-height: 1.2rem;
1132+
-webkit-line-clamp: 2;
1133+
-webkit-box-orient: vertical;
10931134
overflow: hidden;
10941135
text-overflow: ellipsis;
10951136
white-space: nowrap;

packages/web/src/components/list/__snapshots__/MultiList.test.js.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ exports[`should render list of items 1`] = `
305305
.emotion-4 {
306306
width: 100%;
307307
line-height: 1.5;
308+
min-height: 42px;
308309
padding: 8px 12px;
309310
border: 1px solid #ccc;
310311
background-color: #fafafa;
@@ -637,6 +638,7 @@ exports[`should render search/count/checkbox when showSearch/showCount/showCheck
637638
.emotion-4 {
638639
width: 100%;
639640
line-height: 1.5;
641+
min-height: 42px;
640642
padding: 8px 12px;
641643
border: 1px solid #ccc;
642644
background-color: #fafafa;
@@ -940,6 +942,7 @@ exports[`should select default value 1`] = `
940942
.emotion-4 {
941943
width: 100%;
942944
line-height: 1.5;
945+
min-height: 42px;
943946
padding: 8px 12px;
944947
border: 1px solid #ccc;
945948
background-color: #fafafa;
@@ -1244,6 +1247,7 @@ exports[`should use render prop to render the list item 1`] = `
12441247
.emotion-4 {
12451248
width: 100%;
12461249
line-height: 1.5;
1250+
min-height: 42px;
12471251
padding: 8px 12px;
12481252
border: 1px solid #ccc;
12491253
background-color: #fafafa;
@@ -1320,6 +1324,7 @@ exports[`should use renderItem to render the list item 1`] = `
13201324
.emotion-4 {
13211325
width: 100%;
13221326
line-height: 1.5;
1327+
min-height: 42px;
13231328
padding: 8px 12px;
13241329
border: 1px solid #ccc;
13251330
background-color: #fafafa;

packages/web/src/components/list/__snapshots__/SingleDataList.test.js.snap

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ exports[`should render 1`] = `
2424
.emotion-4 {
2525
width: 100%;
2626
line-height: 1.5;
27+
min-height: 42px;
2728
padding: 8px 12px;
2829
border: 1px solid #ccc;
2930
background-color: #fafafa;
@@ -331,6 +332,7 @@ exports[`should render with displayAsVertical 1`] = `
331332
.emotion-4 {
332333
width: 100%;
333334
line-height: 1.5;
335+
min-height: 42px;
334336
padding: 8px 12px;
335337
border: 1px solid #ccc;
336338
background-color: #fafafa;
@@ -638,6 +640,7 @@ exports[`should render with renderItem 1`] = `
638640
.emotion-4 {
639641
width: 100%;
640642
line-height: 1.5;
643+
min-height: 42px;
641644
padding: 8px 12px;
642645
border: 1px solid #ccc;
643646
background-color: #fafafa;
@@ -933,6 +936,7 @@ exports[`should render with showCount 1`] = `
933936
.emotion-4 {
934937
width: 100%;
935938
line-height: 1.5;
939+
min-height: 42px;
936940
padding: 8px 12px;
937941
border: 1px solid #ccc;
938942
background-color: #fafafa;
@@ -1250,6 +1254,7 @@ exports[`should render with showRadio 1`] = `
12501254
.emotion-4 {
12511255
width: 100%;
12521256
line-height: 1.5;
1257+
min-height: 42px;
12531258
padding: 8px 12px;
12541259
border: 1px solid #ccc;
12551260
background-color: #fafafa;
@@ -1557,6 +1562,7 @@ exports[`should render with showRadio and displayAsVertical 1`] = `
15571562
.emotion-4 {
15581563
width: 100%;
15591564
line-height: 1.5;
1565+
min-height: 42px;
15601566
padding: 8px 12px;
15611567
border: 1px solid #ccc;
15621568
background-color: #fafafa;
@@ -1864,6 +1870,7 @@ exports[`should render with showRadio and showSearch 1`] = `
18641870
.emotion-4 {
18651871
width: 100%;
18661872
line-height: 1.5;
1873+
min-height: 42px;
18671874
padding: 8px 12px;
18681875
border: 1px solid #ccc;
18691876
background-color: #fafafa;
@@ -2171,6 +2178,7 @@ exports[`should render with showRadio, showSearch and displayAsVertical 1`] = `
21712178
.emotion-4 {
21722179
width: 100%;
21732180
line-height: 1.5;
2181+
min-height: 42px;
21742182
padding: 8px 12px;
21752183
border: 1px solid #ccc;
21762184
background-color: #fafafa;
@@ -2478,6 +2486,7 @@ exports[`should render with showSearch 1`] = `
24782486
.emotion-4 {
24792487
width: 100%;
24802488
line-height: 1.5;
2489+
min-height: 42px;
24812490
padding: 8px 12px;
24822491
border: 1px solid #ccc;
24832492
background-color: #fafafa;
@@ -2785,6 +2794,7 @@ exports[`should render with title 1`] = `
27852794
.emotion-4 {
27862795
width: 100%;
27872796
line-height: 1.5;
2797+
min-height: 42px;
27882798
padding: 8px 12px;
27892799
border: 1px solid #ccc;
27902800
background-color: #fafafa;

packages/web/src/components/list/__snapshots__/SingleDropdownList.test.js.snap

Lines changed: 49 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ exports[`should not render search/ count when showSearch/ showCount are false 1`
106106
margin: 0;
107107
padding: 0;
108108
list-style: none;
109-
max-height: 375px;
109+
max-height: min(100vh,402px);
110110
overflow-y: auto;
111111
}
112112
@@ -131,7 +131,17 @@ exports[`should not render search/ count when showSearch/ showCount are false 1`
131131
user-select: none;
132132
}
133133
134-
.emotion-9 li .trim {
134+
.emotion-9 li>.trim {
135+
display: -webkit-box;
136+
display: -webkit-box;
137+
display: -webkit-flex;
138+
display: -ms-flexbox;
139+
display: flex;
140+
width: 100%;
141+
max-height: 2.3rem;
142+
line-height: 1.2rem;
143+
-webkit-line-clamp: 2;
144+
-webkit-box-orient: vertical;
135145
overflow: hidden;
136146
text-overflow: ellipsis;
137147
white-space: nowrap;
@@ -331,7 +341,7 @@ exports[`should render list of items 1`] = `
331341
margin: 0;
332342
padding: 0;
333343
list-style: none;
334-
max-height: 375px;
344+
max-height: min(100vh,402px);
335345
overflow-y: auto;
336346
}
337347
@@ -356,7 +366,17 @@ exports[`should render list of items 1`] = `
356366
user-select: none;
357367
}
358368
359-
.emotion-9 li .trim {
369+
.emotion-9 li>.trim {
370+
display: -webkit-box;
371+
display: -webkit-box;
372+
display: -webkit-flex;
373+
display: -ms-flexbox;
374+
display: flex;
375+
width: 100%;
376+
max-height: 2.3rem;
377+
line-height: 1.2rem;
378+
-webkit-line-clamp: 2;
379+
-webkit-box-orient: vertical;
360380
overflow: hidden;
361381
text-overflow: ellipsis;
362382
white-space: nowrap;
@@ -595,7 +615,7 @@ exports[`should render search/count when showSearch/showCount are true 1`] = `
595615
margin: 0;
596616
padding: 0;
597617
list-style: none;
598-
max-height: 375px;
618+
max-height: min(100vh,402px);
599619
overflow-y: auto;
600620
}
601621
@@ -620,7 +640,17 @@ exports[`should render search/count when showSearch/showCount are true 1`] = `
620640
user-select: none;
621641
}
622642
623-
.emotion-9 li .trim {
643+
.emotion-9 li>.trim {
644+
display: -webkit-box;
645+
display: -webkit-box;
646+
display: -webkit-flex;
647+
display: -ms-flexbox;
648+
display: flex;
649+
width: 100%;
650+
max-height: 2.3rem;
651+
line-height: 1.2rem;
652+
-webkit-line-clamp: 2;
653+
-webkit-box-orient: vertical;
624654
overflow: hidden;
625655
text-overflow: ellipsis;
626656
white-space: nowrap;
@@ -634,6 +664,7 @@ exports[`should render search/count when showSearch/showCount are true 1`] = `
634664
.emotion-10 {
635665
width: 100%;
636666
line-height: 1.5;
667+
min-height: 42px;
637668
padding: 8px 12px;
638669
border: 1px solid #ccc;
639670
background-color: #fafafa;
@@ -1064,7 +1095,7 @@ exports[`should use renderItem to render the list item 1`] = `
10641095
margin: 0;
10651096
padding: 0;
10661097
list-style: none;
1067-
max-height: 375px;
1098+
max-height: min(100vh,402px);
10681099
overflow-y: auto;
10691100
}
10701101
@@ -1089,7 +1120,17 @@ exports[`should use renderItem to render the list item 1`] = `
10891120
user-select: none;
10901121
}
10911122
1092-
.emotion-9 li .trim {
1123+
.emotion-9 li>.trim {
1124+
display: -webkit-box;
1125+
display: -webkit-box;
1126+
display: -webkit-flex;
1127+
display: -ms-flexbox;
1128+
display: flex;
1129+
width: 100%;
1130+
max-height: 2.3rem;
1131+
line-height: 1.2rem;
1132+
-webkit-line-clamp: 2;
1133+
-webkit-box-orient: vertical;
10931134
overflow: hidden;
10941135
text-overflow: ellipsis;
10951136
white-space: nowrap;

0 commit comments

Comments
 (0)