Skip to content

Commit 6be9e51

Browse files
author
liquanwei.lqw
committed
fix: layout test
1 parent a6f0ca7 commit 6be9e51

File tree

3 files changed

+117
-137
lines changed

3 files changed

+117
-137
lines changed

tests/layout/__snapshots__/settingDrawer.test.tsx.snap

+115-135
Original file line numberDiff line numberDiff line change
@@ -718,34 +718,30 @@ exports[`settingDrawer.test > 🌺 base user 1`] = `
718718
class="ant-select-selector"
719719
>
720720
<span
721-
class="ant-select-selection-wrap"
721+
class="ant-select-selection-search"
722722
>
723-
<span
724-
class="ant-select-selection-search"
725-
>
726-
<input
727-
aria-autocomplete="list"
728-
aria-controls="rc_select_TEST_OR_SSR_list"
729-
aria-expanded="false"
730-
aria-haspopup="listbox"
731-
aria-owns="rc_select_TEST_OR_SSR_list"
732-
autocomplete="off"
733-
class="ant-select-selection-search-input"
734-
id="rc_select_TEST_OR_SSR"
735-
readonly=""
736-
role="combobox"
737-
style="opacity: 0;"
738-
type="search"
739-
unselectable="on"
740-
value=""
741-
/>
742-
</span>
743-
<span
744-
class="ant-select-selection-item"
745-
title="Fixed"
746-
>
747-
Fixed
748-
</span>
723+
<input
724+
aria-autocomplete="list"
725+
aria-controls="rc_select_TEST_OR_SSR_list"
726+
aria-expanded="false"
727+
aria-haspopup="listbox"
728+
aria-owns="rc_select_TEST_OR_SSR_list"
729+
autocomplete="off"
730+
class="ant-select-selection-search-input"
731+
id="rc_select_TEST_OR_SSR"
732+
readonly=""
733+
role="combobox"
734+
style="opacity: 0;"
735+
type="search"
736+
unselectable="on"
737+
value=""
738+
/>
739+
</span>
740+
<span
741+
class="ant-select-selection-item"
742+
title="Fixed"
743+
>
744+
Fixed
749745
</span>
750746
</div>
751747
<span
@@ -1855,34 +1851,30 @@ exports[`settingDrawer.test > 🌺 hideColors = true 1`] = `
18551851
class="ant-select-selector"
18561852
>
18571853
<span
1858-
class="ant-select-selection-wrap"
1854+
class="ant-select-selection-search"
18591855
>
1860-
<span
1861-
class="ant-select-selection-search"
1862-
>
1863-
<input
1864-
aria-autocomplete="list"
1865-
aria-controls="rc_select_TEST_OR_SSR_list"
1866-
aria-expanded="false"
1867-
aria-haspopup="listbox"
1868-
aria-owns="rc_select_TEST_OR_SSR_list"
1869-
autocomplete="off"
1870-
class="ant-select-selection-search-input"
1871-
id="rc_select_TEST_OR_SSR"
1872-
readonly=""
1873-
role="combobox"
1874-
style="opacity: 0;"
1875-
type="search"
1876-
unselectable="on"
1877-
value=""
1878-
/>
1879-
</span>
1880-
<span
1881-
class="ant-select-selection-item"
1882-
title="Fixed"
1883-
>
1884-
Fixed
1885-
</span>
1856+
<input
1857+
aria-autocomplete="list"
1858+
aria-controls="rc_select_TEST_OR_SSR_list"
1859+
aria-expanded="false"
1860+
aria-haspopup="listbox"
1861+
aria-owns="rc_select_TEST_OR_SSR_list"
1862+
autocomplete="off"
1863+
class="ant-select-selection-search-input"
1864+
id="rc_select_TEST_OR_SSR"
1865+
readonly=""
1866+
role="combobox"
1867+
style="opacity: 0;"
1868+
type="search"
1869+
unselectable="on"
1870+
value=""
1871+
/>
1872+
</span>
1873+
<span
1874+
class="ant-select-selection-item"
1875+
title="Fixed"
1876+
>
1877+
Fixed
18861878
</span>
18871879
</div>
18881880
<span
@@ -3061,34 +3053,30 @@ exports[`settingDrawer.test > 🌺 hideCopyButton = true 1`] = `
30613053
class="ant-select-selector"
30623054
>
30633055
<span
3064-
class="ant-select-selection-wrap"
3056+
class="ant-select-selection-search"
30653057
>
3066-
<span
3067-
class="ant-select-selection-search"
3068-
>
3069-
<input
3070-
aria-autocomplete="list"
3071-
aria-controls="rc_select_TEST_OR_SSR_list"
3072-
aria-expanded="false"
3073-
aria-haspopup="listbox"
3074-
aria-owns="rc_select_TEST_OR_SSR_list"
3075-
autocomplete="off"
3076-
class="ant-select-selection-search-input"
3077-
id="rc_select_TEST_OR_SSR"
3078-
readonly=""
3079-
role="combobox"
3080-
style="opacity: 0;"
3081-
type="search"
3082-
unselectable="on"
3083-
value=""
3084-
/>
3085-
</span>
3086-
<span
3087-
class="ant-select-selection-item"
3088-
title="Fixed"
3089-
>
3090-
Fixed
3091-
</span>
3058+
<input
3059+
aria-autocomplete="list"
3060+
aria-controls="rc_select_TEST_OR_SSR_list"
3061+
aria-expanded="false"
3062+
aria-haspopup="listbox"
3063+
aria-owns="rc_select_TEST_OR_SSR_list"
3064+
autocomplete="off"
3065+
class="ant-select-selection-search-input"
3066+
id="rc_select_TEST_OR_SSR"
3067+
readonly=""
3068+
role="combobox"
3069+
style="opacity: 0;"
3070+
type="search"
3071+
unselectable="on"
3072+
value=""
3073+
/>
3074+
</span>
3075+
<span
3076+
class="ant-select-selection-item"
3077+
title="Fixed"
3078+
>
3079+
Fixed
30923080
</span>
30933081
</div>
30943082
<span
@@ -4235,34 +4223,30 @@ exports[`settingDrawer.test > 🌺 hideHintAlert = true 1`] = `
42354223
class="ant-select-selector"
42364224
>
42374225
<span
4238-
class="ant-select-selection-wrap"
4226+
class="ant-select-selection-search"
42394227
>
4240-
<span
4241-
class="ant-select-selection-search"
4242-
>
4243-
<input
4244-
aria-autocomplete="list"
4245-
aria-controls="rc_select_TEST_OR_SSR_list"
4246-
aria-expanded="false"
4247-
aria-haspopup="listbox"
4248-
aria-owns="rc_select_TEST_OR_SSR_list"
4249-
autocomplete="off"
4250-
class="ant-select-selection-search-input"
4251-
id="rc_select_TEST_OR_SSR"
4252-
readonly=""
4253-
role="combobox"
4254-
style="opacity: 0;"
4255-
type="search"
4256-
unselectable="on"
4257-
value=""
4258-
/>
4259-
</span>
4260-
<span
4261-
class="ant-select-selection-item"
4262-
title="Fixed"
4263-
>
4264-
Fixed
4265-
</span>
4228+
<input
4229+
aria-autocomplete="list"
4230+
aria-controls="rc_select_TEST_OR_SSR_list"
4231+
aria-expanded="false"
4232+
aria-haspopup="listbox"
4233+
aria-owns="rc_select_TEST_OR_SSR_list"
4234+
autocomplete="off"
4235+
class="ant-select-selection-search-input"
4236+
id="rc_select_TEST_OR_SSR"
4237+
readonly=""
4238+
role="combobox"
4239+
style="opacity: 0;"
4240+
type="search"
4241+
unselectable="on"
4242+
value=""
4243+
/>
4244+
</span>
4245+
<span
4246+
class="ant-select-selection-item"
4247+
title="Fixed"
4248+
>
4249+
Fixed
42664250
</span>
42674251
</div>
42684252
<span
@@ -5406,34 +5390,30 @@ exports[`settingDrawer.test > 🌺 settings = undefined 1`] = `
54065390
class="ant-select-selector"
54075391
>
54085392
<span
5409-
class="ant-select-selection-wrap"
5393+
class="ant-select-selection-search"
54105394
>
5411-
<span
5412-
class="ant-select-selection-search"
5413-
>
5414-
<input
5415-
aria-autocomplete="list"
5416-
aria-controls="rc_select_TEST_OR_SSR_list"
5417-
aria-expanded="false"
5418-
aria-haspopup="listbox"
5419-
aria-owns="rc_select_TEST_OR_SSR_list"
5420-
autocomplete="off"
5421-
class="ant-select-selection-search-input"
5422-
id="rc_select_TEST_OR_SSR"
5423-
readonly=""
5424-
role="combobox"
5425-
style="opacity: 0;"
5426-
type="search"
5427-
unselectable="on"
5428-
value=""
5429-
/>
5430-
</span>
5431-
<span
5432-
class="ant-select-selection-item"
5433-
title="流式"
5434-
>
5435-
流式
5436-
</span>
5395+
<input
5396+
aria-autocomplete="list"
5397+
aria-controls="rc_select_TEST_OR_SSR_list"
5398+
aria-expanded="false"
5399+
aria-haspopup="listbox"
5400+
aria-owns="rc_select_TEST_OR_SSR_list"
5401+
autocomplete="off"
5402+
class="ant-select-selection-search-input"
5403+
id="rc_select_TEST_OR_SSR"
5404+
readonly=""
5405+
role="combobox"
5406+
style="opacity: 0;"
5407+
type="search"
5408+
unselectable="on"
5409+
value=""
5410+
/>
5411+
</span>
5412+
<span
5413+
class="ant-select-selection-item"
5414+
title="流式"
5415+
>
5416+
流式
54375417
</span>
54385418
</div>
54395419
<span

tests/layout/index.test.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1889,7 +1889,7 @@ describe('BasicLayout', () => {
18891889
await waitForWaitTime(100);
18901890
expect(
18911891
html.baseElement.querySelectorAll('li.ant-menu-submenu-open').length,
1892-
).toBe(0);
1892+
).toBe(2);
18931893
});
18941894

18951895
it('🥩 formatMessage support', async () => {

tests/layout/pageContainer.test.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ describe('PageContainer', () => {
560560
/>,
561561
);
562562

563-
expect(html.container.innerText).toBe(undefined);
563+
expect(html.container.innerText).toBe('');
564564

565565
html.rerender(
566566
<PageContainer

0 commit comments

Comments
 (0)