Skip to content

Commit c325f24

Browse files
committed
test: update snap
1 parent 6197d60 commit c325f24

File tree

6 files changed

+255
-258
lines changed

6 files changed

+255
-258
lines changed

components/cascader/__tests__/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ describe('Cascader', () => {
100100
expect($$('.ant-cascader-menus').length).toBe(1);
101101
await asyncExpect(() => {
102102
expect($$('.ant-cascader-menus')[0].parentNode.parentNode.innerHTML).toMatchSnapshot();
103-
});
103+
}, 0);
104104
});
105105

106106
it('can be selected', async () => {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@ describe('MonthPicker and WeekPicker', () => {
7272
await sleep(50);
7373
await asyncExpect(() => {
7474
expect(document.body.innerHTML).toMatchSnapshot();
75-
});
75+
}, 0);
7676
});
7777
});

components/locale-provider/__tests__/__snapshots__/index.test.js.snap

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

components/locale-provider/__tests__/index.test.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { mount } from '@vue/test-utils';
2-
import * as Vue from 'vue';
32
import moment from 'moment';
43
import MockDate from 'mockdate';
54
import { sleep } from '../../../tests/utils';
@@ -178,7 +177,7 @@ describe('Locale Provider', () => {
178177
});
179178

180179
locales.forEach(locale => {
181-
it(`should display the text as ${locale.locale}`, done => {
180+
it(`should display the text as ${locale.locale}`, async () => {
182181
const wrapper = mount(
183182
{
184183
render() {
@@ -191,10 +190,8 @@ describe('Locale Provider', () => {
191190
},
192191
{ sync: false, attachTo: 'body' },
193192
);
194-
Vue.nextTick(() => {
195-
expect(wrapper.html()).toMatchSnapshot();
196-
done();
197-
});
193+
await sleep();
194+
expect(wrapper.html()).toMatchSnapshot();
198195
});
199196
});
200197

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ exports[`Slider should show tooltip when hovering slider handler 2`] = `
4444
<div style="position: absolute; top: 0px; left: 0px; width: 100%;">
4545
<div>
4646
<!---->
47-
<div class="ant-tooltip ant-slider-tooltip ant-tooltip-placement-top zoom-down-leave" style="left: -999px; top: -1003px;">
47+
<div class="ant-tooltip ant-slider-tooltip ant-tooltip-placement-top" style="left: -999px; top: -1003px; display: none;">
4848
<div class="ant-tooltip-content">
4949
<div class="ant-tooltip-arrow">
5050
<!---->

components/slider/__tests__/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ describe('Slider', () => {
2222
});
2323
await asyncExpect(() => {
2424
expect(document.body.innerHTML).toMatchSnapshot();
25-
});
25+
}, 0);
2626
});
2727
});

0 commit comments

Comments
 (0)