Skip to content

Commit 3b1d48b

Browse files
committed
test: update test
1 parent dd1a535 commit 3b1d48b

File tree

13 files changed

+959
-394
lines changed

13 files changed

+959
-394
lines changed

components/page-header/__tests__/__snapshots__/demo.test.js.snap

Lines changed: 431 additions & 282 deletions
Large diffs are not rendered by default.

components/spin/__tests__/__snapshots__/index.test.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports[`Spin should only affect the spin element when set style to a nested <Spin>xx</Spin> 1`] = `
44
<div class="ant-spin-nested-loading">
55
<div>
6-
<div style="background: red;" class="ant-spin ant-spin-spinning"><span class="ant-spin-dot ant-spin-dot-spin"><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i></span>
6+
<div style="background: red;" class="ant-spin ant-spin-spinning" aria-live="polite" aria-busy="true"><span class="ant-spin-dot ant-spin-dot-spin"><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i></span>
77
<!---->
88
</div>
99
</div>
@@ -14,7 +14,7 @@ exports[`Spin should only affect the spin element when set style to a nested <Sp
1414
`;
1515

1616
exports[`Spin should render custom indicator when it's set 1`] = `
17-
<div class="ant-spin ant-spin-spinning">
17+
<div class="ant-spin ant-spin-spinning" aria-live="polite" aria-busy="true">
1818
<div class="custom-indicator ant-spin-dot"></div>
1919
<!---->
2020
</div>

components/statistic/__tests__/__snapshots__/demo.test.js.snap

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`renders ./components/statistic/demo/basic.vue correctly 1`] = `
4-
<div class="ant-row">
5-
<div class="ant-col ant-col-12">
4+
<div role="row" class="ant-row">
5+
<div role="cell" class="ant-col ant-col-12">
66
<div class="ant-statistic" style="margin-right: 50px;">
77
<div class="ant-statistic-title">Active Users</div>
88
<div class="ant-statistic-content">
@@ -11,7 +11,7 @@ exports[`renders ./components/statistic/demo/basic.vue correctly 1`] = `
1111
</div>
1212
</div>
1313
</div>
14-
<div class="ant-col ant-col-12">
14+
<div role="cell" class="ant-col ant-col-12">
1515
<div class="ant-statistic">
1616
<div class="ant-statistic-title">Account Balance (CNY)</div>
1717
<div class="ant-statistic-content">
@@ -25,8 +25,8 @@ exports[`renders ./components/statistic/demo/basic.vue correctly 1`] = `
2525

2626
exports[`renders ./components/statistic/demo/card.vue correctly 1`] = `
2727
<div style="background: rgb(236, 236, 236); padding: 30px;">
28-
<div class="ant-row" style="margin-left: -8px; margin-right: -8px;">
29-
<div class="ant-col ant-col-12" style="padding-left: 8px; padding-right: 8px;">
28+
<div role="row" class="ant-row" style="margin-left: -8px; margin-right: -8px;">
29+
<div role="cell" class="ant-col ant-col-12" style="padding-left: 8px; padding-right: 8px;">
3030
<div class="ant-card ant-card-bordered">
3131
<!---->
3232
<!---->
@@ -39,7 +39,7 @@ exports[`renders ./components/statistic/demo/card.vue correctly 1`] = `
3939
<!---->
4040
</div>
4141
</div>
42-
<div class="ant-col ant-col-12" style="padding-left: 8px; padding-right: 8px;">
42+
<div role="cell" class="ant-col ant-col-12" style="padding-left: 8px; padding-right: 8px;">
4343
<div class="ant-card ant-card-bordered">
4444
<!---->
4545
<!---->
@@ -57,8 +57,8 @@ exports[`renders ./components/statistic/demo/card.vue correctly 1`] = `
5757
`;
5858

5959
exports[`renders ./components/statistic/demo/countdown.vue correctly 1`] = `
60-
<div class="ant-row" style="margin-left: -8px; margin-right: -8px;">
61-
<div class="ant-col ant-col-12" style="padding-left: 8px; padding-right: 8px;">
60+
<div role="row" class="ant-row" style="margin-left: -8px; margin-right: -8px;">
61+
<div role="cell" class="ant-col ant-col-12" style="padding-left: 8px; padding-right: 8px;">
6262
<div class="ant-statistic" style="margin-right: 50px;">
6363
<div class="ant-statistic-title">Countdown</div>
6464
<div class="ant-statistic-content">
@@ -67,7 +67,7 @@ exports[`renders ./components/statistic/demo/countdown.vue correctly 1`] = `
6767
</div>
6868
</div>
6969
</div>
70-
<div class="ant-col ant-col-12" style="padding-left: 8px; padding-right: 8px;">
70+
<div role="cell" class="ant-col ant-col-12" style="padding-left: 8px; padding-right: 8px;">
7171
<div class="ant-statistic" style="margin-right: 50px;">
7272
<div class="ant-statistic-title">Million Seconds</div>
7373
<div class="ant-statistic-content">
@@ -76,7 +76,7 @@ exports[`renders ./components/statistic/demo/countdown.vue correctly 1`] = `
7676
</div>
7777
</div>
7878
</div>
79-
<div class="ant-col ant-col-24" style="padding-left: 8px; padding-right: 8px; margin-top: 32px;">
79+
<div role="cell" class="ant-col ant-col-24" style="padding-left: 8px; padding-right: 8px; margin-top: 32px;">
8080
<div class="ant-statistic">
8181
<div class="ant-statistic-title">Day Level</div>
8282
<div class="ant-statistic-content">
@@ -89,8 +89,8 @@ exports[`renders ./components/statistic/demo/countdown.vue correctly 1`] = `
8989
`;
9090

9191
exports[`renders ./components/statistic/demo/countdown-slot.vue correctly 1`] = `
92-
<div class="ant-row" style="margin-left: -8px; margin-right: -8px;">
93-
<div class="ant-col ant-col-12" style="padding-left: 8px; padding-right: 8px;">
92+
<div role="row" class="ant-row" style="margin-left: -8px; margin-right: -8px;">
93+
<div role="cell" class="ant-col ant-col-12" style="padding-left: 8px; padding-right: 8px;">
9494
<div class="ant-statistic" style="margin-right: 50px;">
9595
<div class="ant-statistic-title"><span>Countdown</span>
9696
<!----><span role="img" aria-label="question-circle" style="margin-left: 5px;" tabindex="-1" class="anticon anticon-question-circle"><svg focusable="false" class="" data-icon="question-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" fill="#1890ff"></path><path d="M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm0 632c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 00-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z" fill="#e6f7ff"></path><path d="M472 732a40 40 0 1080 0 40 40 0 10-80 0zm151.6-415.3C593.6 290.5 554 276 512 276s-81.6 14.4-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.2 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5 0-39.3-17.2-76-48.4-103.3z" fill="#1890ff"></path></svg></span>
@@ -101,7 +101,7 @@ exports[`renders ./components/statistic/demo/countdown-slot.vue correctly 1`] =
101101
</div>
102102
</div>
103103
</div>
104-
<div class="ant-col ant-col-24" style="padding-left: 8px; padding-right: 8px; margin-top: 32px;">
104+
<div role="cell" class="ant-col ant-col-24" style="padding-left: 8px; padding-right: 8px; margin-top: 32px;">
105105
<div class="ant-statistic" style="margin-right: 50px;">
106106
<div class="ant-statistic-title">Million Seconds countdown</div>
107107
<div class="ant-statistic-content"><span class="ant-statistic-content-prefix"><span>There's only</span></span><span class="ant-statistic-content-value">40:00:00:000</span><span class="ant-statistic-content-suffix"><span>left for the end.</span></span></div>
@@ -111,16 +111,16 @@ exports[`renders ./components/statistic/demo/countdown-slot.vue correctly 1`] =
111111
`;
112112

113113
exports[`renders ./components/statistic/demo/unit.vue correctly 1`] = `
114-
<div class="ant-row" style="margin-left: -8px; margin-right: -8px;">
115-
<div class="ant-col ant-col-12" style="padding-left: 8px; padding-right: 8px;">
114+
<div role="row" class="ant-row" style="margin-left: -8px; margin-right: -8px;">
115+
<div role="cell" class="ant-col ant-col-12" style="padding-left: 8px; padding-right: 8px;">
116116
<div class="ant-statistic" style="margin-right: 50px;">
117117
<div class="ant-statistic-title">Feedback</div>
118118
<div class="ant-statistic-content">
119119
<!----><span class="ant-statistic-content-value"><span class="ant-statistic-content-value-int">1,128</span></span><span class="ant-statistic-content-suffix"><span role="img" aria-label="like" class="anticon anticon-like"><svg focusable="false" class="" data-icon="like" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 00-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 00471 99.9c-52 0-98 35-111.8 85.1l-85.9 311H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h601.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM184 852V568h81v284h-81zm636.4-353l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 22.4-13.2 42.6-33.6 51.8H329V564.8l99.5-360.5a44.1 44.1 0 0142.2-32.3c7.6 0 15.1 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.2 32.1-19.6 43z"></path></svg></span></span>
120120
</div>
121121
</div>
122122
</div>
123-
<div class="ant-col ant-col-12" style="padding-left: 8px; padding-right: 8px;">
123+
<div role="cell" class="ant-col ant-col-12" style="padding-left: 8px; padding-right: 8px;">
124124
<div class="ant-statistic demo-class">
125125
<div class="ant-statistic-title">Unmerged</div>
126126
<div class="ant-statistic-content">

components/table/__tests__/__snapshots__/Table.rowSelection.test.js.snap

Lines changed: 40 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -107,57 +107,55 @@ exports[`Table.rowSelection render with default selection correctly 1`] = `
107107
<div>
108108
<!---->
109109
<div class="ant-dropdown" style="pointer-events: none; display: none;">
110-
<div class="ant-dropdown-content">
111-
<!---->
112-
<ul class="ant-dropdown-menu ant-dropdown-menu-root ant-dropdown-menu-vertical ant-dropdown-menu-light" role="menu" data-menu-list="true">
113-
<div>
114-
<!---->
115-
<div class="ant-tooltip ant-dropdown-menu-inline-collapsed-tooltip" style="pointer-events: none; display: none;">
116-
<div class="ant-tooltip-content">
117-
<div class="ant-tooltip-arrow"><span class="ant-tooltip-arrow-content"></span></div>
118-
<div class="ant-tooltip-inner" role="tooltip">
119-
<!---->
120-
</div>
110+
<!---->
111+
<ul class="ant-dropdown-menu ant-dropdown-menu-root ant-dropdown-menu-vertical ant-dropdown-menu-light" role="menu" data-menu-list="true">
112+
<div>
113+
<!---->
114+
<div class="ant-tooltip ant-dropdown-menu-inline-collapsed-tooltip" style="pointer-events: none; display: none;">
115+
<div class="ant-tooltip-content">
116+
<div class="ant-tooltip-arrow"><span class="ant-tooltip-arrow-content"></span></div>
117+
<div class="ant-tooltip-inner" role="tooltip">
118+
<!---->
121119
</div>
122120
</div>
123121
</div>
124-
<li class="ant-dropdown-menu-item ant-dropdown-menu-item-only-child" role="menuitem" tabindex="-1" data-menu-id="all" aria-disabled="false">
125-
<!----><span class="ant-dropdown-menu-title-content">Select all data</span>
126-
</li>
127-
<div>
128-
<!---->
129-
<div class="ant-tooltip ant-dropdown-menu-inline-collapsed-tooltip" style="pointer-events: none; display: none;">
130-
<div class="ant-tooltip-content">
131-
<div class="ant-tooltip-arrow"><span class="ant-tooltip-arrow-content"></span></div>
132-
<div class="ant-tooltip-inner" role="tooltip">
133-
<!---->
134-
</div>
122+
</div>
123+
<li class="ant-dropdown-menu-item ant-dropdown-menu-item-only-child" role="menuitem" tabindex="-1" data-menu-id="all" aria-disabled="false">
124+
<!----><span class="ant-dropdown-menu-title-content">Select all data</span>
125+
</li>
126+
<div>
127+
<!---->
128+
<div class="ant-tooltip ant-dropdown-menu-inline-collapsed-tooltip" style="pointer-events: none; display: none;">
129+
<div class="ant-tooltip-content">
130+
<div class="ant-tooltip-arrow"><span class="ant-tooltip-arrow-content"></span></div>
131+
<div class="ant-tooltip-inner" role="tooltip">
132+
<!---->
135133
</div>
136134
</div>
137135
</div>
138-
<li class="ant-dropdown-menu-item ant-dropdown-menu-item-only-child" role="menuitem" tabindex="-1" data-menu-id="invert" aria-disabled="false">
139-
<!----><span class="ant-dropdown-menu-title-content">Invert current page</span>
140-
</li>
141-
<div>
142-
<!---->
143-
<div class="ant-tooltip ant-dropdown-menu-inline-collapsed-tooltip" style="pointer-events: none; display: none;">
144-
<div class="ant-tooltip-content">
145-
<div class="ant-tooltip-arrow"><span class="ant-tooltip-arrow-content"></span></div>
146-
<div class="ant-tooltip-inner" role="tooltip">
147-
<!---->
148-
</div>
136+
</div>
137+
<li class="ant-dropdown-menu-item ant-dropdown-menu-item-only-child" role="menuitem" tabindex="-1" data-menu-id="invert" aria-disabled="false">
138+
<!----><span class="ant-dropdown-menu-title-content">Invert current page</span>
139+
</li>
140+
<div>
141+
<!---->
142+
<div class="ant-tooltip ant-dropdown-menu-inline-collapsed-tooltip" style="pointer-events: none; display: none;">
143+
<div class="ant-tooltip-content">
144+
<div class="ant-tooltip-arrow"><span class="ant-tooltip-arrow-content"></span></div>
145+
<div class="ant-tooltip-inner" role="tooltip">
146+
<!---->
149147
</div>
150148
</div>
151149
</div>
152-
<li class="ant-dropdown-menu-item ant-dropdown-menu-item-only-child" role="menuitem" tabindex="-1" data-menu-id="none" aria-disabled="false">
153-
<!----><span class="ant-dropdown-menu-title-content">Clear all data</span>
154-
</li>
155-
<!---->
156-
<!---->
157-
<!--teleport start-->
158-
<!--teleport end-->
159-
</ul>
160-
</div>
150+
</div>
151+
<li class="ant-dropdown-menu-item ant-dropdown-menu-item-only-child" role="menuitem" tabindex="-1" data-menu-id="none" aria-disabled="false">
152+
<!----><span class="ant-dropdown-menu-title-content">Clear all data</span>
153+
</li>
154+
<!---->
155+
<!---->
156+
<!--teleport start-->
157+
<!--teleport end-->
158+
</ul>
161159
</div>
162160
</div>
163161
`;

components/table/__tests__/__snapshots__/Table.sorter.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports[`Table.sorter renders sorter icon correctly 1`] = `
44
<thead class="ant-table-thead">
55
<tr>
6-
<th class="ant-table-cell ant-table-column-has-sorters" colstart="0" colend="0">
6+
<th class="ant-table-cell ant-table-column-has-sorters" tabindex="0" colstart="0" colend="0">
77
<!---->
88
<!---->
99
<div class="ant-table-column-sorters"><span class="ant-table-column-title">Name</span><span class="ant-table-column-sorter ant-table-column-sorter-full"><span class="ant-table-column-sorter-inner"><span role="img" aria-label="caret-up" class="anticon anticon-caret-up ant-table-column-sorter-up"><svg focusable="false" class="" data-icon="caret-up" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="0 0 1024 1024"><path d="M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"></path></svg></span><span role="img" aria-label="caret-down" class="anticon anticon-caret-down ant-table-column-sorter-down"><svg focusable="false" class="" data-icon="caret-down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="0 0 1024 1024"><path d="M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"></path></svg></span></span></span></div>

0 commit comments

Comments
 (0)