Skip to content

Commit 9791231

Browse files
committed
test: update snap
1 parent 883d6e2 commit 9791231

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

components/date-picker/__tests__/__snapshots__/other.test.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ exports[`MonthPicker and WeekPicker render WeekPicker 1`] = `
7777
<div style="position: absolute; top: 0px; left: 0px; width: 100%;">
7878
<div>
7979
<!---->
80-
<div class="ant-picker-dropdown ant-slide-up-enter-from ant-slide-up-enter-active" style="pointer-events: none; opacity: 0;">
80+
<div class="ant-picker-dropdown" style="pointer-events: none;">
8181
<div class="ant-picker-panel-container">
8282
<div tabindex="-1" class="ant-picker-panel ant-picker-panel-focused">
8383
<div class="ant-picker-week-panel">

components/date-picker/__tests__/other.test.js

+4-7
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,9 @@ describe('MonthPicker and WeekPicker', () => {
6565
it('render WeekPicker', async () => {
6666
const birthday = dayjs('2000-01-01', 'YYYY-MM-DD').locale('zh-cn');
6767
const wrapper = mount(WeekPicker, { props: { open: false }, sync: false });
68-
await asyncExpect(() => {
69-
wrapper.setProps({ value: birthday, open: true });
70-
});
71-
await sleep(50);
72-
await asyncExpect(() => {
73-
expect(document.body.innerHTML).toMatchSnapshot();
74-
}, 0);
68+
await sleep(10);
69+
wrapper.setProps({ value: birthday, open: true });
70+
await sleep(1000);
71+
expect(document.body.innerHTML).toMatchSnapshot();
7572
});
7673
});

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ exports[`Slider should show tooltip when hovering slider handler 1`] = `
1616
<div style="position: absolute; top: 0px; left: 0px; width: 100%;">
1717
<div>
1818
<!---->
19-
<div class="ant-tooltip ant-slider-tooltip ant-zoom-down-enter-from ant-zoom-down-enter-active" style="pointer-events: none; opacity: 0;">
19+
<div class="ant-tooltip ant-slider-tooltip" style="pointer-events: none;">
2020
<div class="ant-tooltip-content">
2121
<div class="ant-tooltip-arrow"><span class="ant-tooltip-arrow-content"></span></div>
2222
<div class="ant-tooltip-inner" role="tooltip">30</div>
@@ -42,7 +42,7 @@ exports[`Slider should show tooltip when hovering slider handler 2`] = `
4242
<div style="position: absolute; top: 0px; left: 0px; width: 100%;">
4343
<div>
4444
<!---->
45-
<div class="ant-tooltip ant-slider-tooltip ant-zoom-down-leave-from ant-zoom-down-leave-active" style="pointer-events: none;">
45+
<div class="ant-tooltip ant-slider-tooltip" style="pointer-events: none; display: none;">
4646
<div class="ant-tooltip-content">
4747
<div class="ant-tooltip-arrow"><span class="ant-tooltip-arrow-content"></span></div>
4848
<div class="ant-tooltip-inner" role="tooltip">30</div>

components/slider/__tests__/index.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ describe('Slider', () => {
1515
});
1616
await asyncExpect(() => {
1717
wrapper.findAll('.ant-slider-handle')[0].trigger('mouseenter');
18-
});
18+
}, 1000);
1919
await asyncExpect(() => {
2020
expect(document.body.innerHTML).toMatchSnapshot();
2121
wrapper.findAll('.ant-slider-handle')[0].trigger('mouseleave');
22-
}, 100);
22+
}, 1000);
2323
await asyncExpect(() => {
2424
expect(document.body.innerHTML).toMatchSnapshot();
2525
}, 100);

0 commit comments

Comments
 (0)