Skip to content

Commit 51c82f5

Browse files
committed
chore: 更新单元测试快照
1 parent 362fd9f commit 51c82f5

File tree

8 files changed

+24
-9
lines changed

8 files changed

+24
-9
lines changed

src/packages/address/__test__/__snapshots__/address.spec.tsx.snap

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

src/packages/cascader/__tests__/__snapshots__/cascader.spec.tsx.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ exports[`Cascader > value 1`] = `<div />`;
1111
exports[`Cascader > visible true 1`] = `
1212
<div>
1313
<div
14+
arialabel="蒙层"
1415
class="nut-overlay"
1516
style="z-index: 1000;"
1617
/>
1718
<div
1819
class="nut-popup nut-popup-round nut-popup-bottom"
20+
role="dialog"
1921
style="z-index: 1000;"
2022
>
2123
<div

src/packages/cell/__test__/__snapshots__/cell.spec.tsx.snap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,11 @@ exports[`slot extra 1`] = `
9999
class="nut-cell-extra"
100100
>
101101
<div
102+
aria-checked="true"
103+
aria-disabled="false"
102104
class="nut-switch"
105+
role="switch"
106+
tabindex="0"
103107
>
104108
<div
105109
class="nut-switch-button nut-switch-button-open"

src/packages/checkbox/__test__/__snapshots__/checkbox.spec.tsx.snap

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
exports[`should match snapshot 1`] = `
44
<DocumentFragment>
55
<div
6-
class="nut-checkbox nut-checkbox-reverse"
6+
aria-checked="true"
7+
class="nut-checkbox nut-checkbox-reverse nut-checkbox-active"
8+
role="checkbox"
9+
tabindex="0"
710
>
811
<div
912
class="nut-checkbox-icon-wrap"

src/packages/numberkeyboard/_test_/__snapshots__/index.spec.tsx.snap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
exports[`should match custom snapshot 1`] = `
44
<div>
55
<div
6+
arialabel="蒙层"
67
class="nut-overlay"
78
style="background-color: rgba(0, 0, 0, 0); z-index: 9999;"
89
/>
910
<div
1011
class="nut-popup nut-popup-round nut-popup-bottom"
12+
role="dialog"
1113
style="z-index: 9999;"
1214
>
1315
<div
@@ -196,11 +198,13 @@ exports[`should match custom snapshot 1`] = `
196198
exports[`should match snapshot 1`] = `
197199
<div>
198200
<div
201+
arialabel="蒙层"
199202
class="nut-overlay"
200203
style="background-color: rgba(0, 0, 0, 0); z-index: 9999;"
201204
/>
202205
<div
203206
class="nut-popup nut-popup-round nut-popup-bottom"
207+
role="dialog"
204208
style="z-index: 9999;"
205209
>
206210
<div

src/packages/overlay/__tests__/__snapshots__/overlay.spec.tsx.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
exports[`content test 1`] = `
44
<div>
55
<div
6+
arialabel="蒙层"
67
class="nut-overlay"
78
style="z-index: 1000;"
89
>

src/packages/overlay/__tests__/overlay.spec.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ test('should change z-index when using z-index prop', () => {
1111
// @ts-ignore
1212
expect(getByTestId('overlay-zindex')).toMatchInlineSnapshot(`
1313
<div
14+
arialabel="蒙层"
1415
class="nut-overlay"
1516
data-testid="overlay-zindex"
1617
style="z-index: 99;"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

3-
exports[`timeselect props test 1`] = `"<div><div class="nut-overlay" style="z-index: 1000;"></div><div style="z-index: 1000;" class="nut-popup nut-popup-round nut-popup-bottom"><div class="nut-popup-title"><div class="nut-popup-title-wrapper"><div class="nut-popup-title-title">取件时间</div></div><div class="nut-popup-title-right nut-popup-title-right-top-right"><svg class="nut-icon nut-icon-Close " xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" aria-labelledby="Close" role="presentation"><path d="M512 557.23 783.57 828.8c8.32 8.32 21.76 8.32 30.3 0l14.93-14.93c8.32-8.32 8.32-21.76 0-30.3L557.23 512 828.8 240.43c8.32-8.32 8.32-21.76 0-30.3l-14.93-14.93c-8.32-8.32-21.76-8.32-30.3 0L512 466.77 240.43 195.2c-8.32-8.32-21.76-8.32-30.3 0l-14.93 14.93c-8.32 8.32-8.32 21.76 0 30.3L466.77 512 195.2 783.57c-8.32 8.32-8.32 21.76 0 30.3l14.93 14.93c8.32 8.32 21.76 8.32 30.3 0z" fill="currentColor"></path></svg></div></div><div class="nut-timeselect"><div class="nut-timeselect-content"><div class="nut-timeselect-content-left"><div class="nut-timepannel active">520</div><div class="nut-timepannel">521</div></div><div class="nut-timedetail"><span class="nut-timedetail-item">09:00-10:00</span><span class="nut-timedetail-item">10:00-11:00</span><span class="nut-timedetail-item">11:00-12:00</span></div></div></div></div></div>"`;
3+
exports[`timeselect props test 1`] = `"<div><div class="nut-overlay" style="z-index: 1000;" arialabel="蒙层"></div><div style="z-index: 1000;" class="nut-popup nut-popup-round nut-popup-bottom" role="dialog"><div class="nut-popup-title"><div class="nut-popup-title-wrapper"><div class="nut-popup-title-title">取件时间</div></div><div class="nut-popup-title-right nut-popup-title-right-top-right" role="button" aria-label="关闭" tabindex="-1"><svg class="nut-icon nut-icon-Close " xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" aria-labelledby="Close" role="presentation"><path d="M512 557.23 783.57 828.8c8.32 8.32 21.76 8.32 30.3 0l14.93-14.93c8.32-8.32 8.32-21.76 0-30.3L557.23 512 828.8 240.43c8.32-8.32 8.32-21.76 0-30.3l-14.93-14.93c-8.32-8.32-21.76-8.32-30.3 0L512 466.77 240.43 195.2c-8.32-8.32-21.76-8.32-30.3 0l-14.93 14.93c-8.32 8.32-8.32 21.76 0 30.3L466.77 512 195.2 783.57c-8.32 8.32-8.32 21.76 0 30.3l14.93 14.93c8.32 8.32 21.76 8.32 30.3 0z" fill="currentColor"></path></svg></div></div><div class="nut-timeselect"><div class="nut-timeselect-content"><div class="nut-timeselect-content-left"><div class="nut-timepannel active">520</div><div class="nut-timepannel">521</div></div><div class="nut-timedetail"><span class="nut-timedetail-item">09:00-10:00</span><span class="nut-timedetail-item">10:00-11:00</span><span class="nut-timedetail-item">11:00-12:00</span></div></div></div></div></div>"`;

0 commit comments

Comments
 (0)