test: update snap

pull/2900/head
tanjinzhou 2020-09-23 19:36:45 +08:00
parent 6197d60d9a
commit c325f246cf
6 changed files with 255 additions and 258 deletions

View File

@ -100,7 +100,7 @@ describe('Cascader', () => {
expect($$('.ant-cascader-menus').length).toBe(1);
await asyncExpect(() => {
expect($$('.ant-cascader-menus')[0].parentNode.parentNode.innerHTML).toMatchSnapshot();
});
}, 0);
});
it('can be selected', async () => {

View File

@ -72,6 +72,6 @@ describe('MonthPicker and WeekPicker', () => {
await sleep(50);
await asyncExpect(() => {
expect(document.body.innerHTML).toMatchSnapshot();
});
}, 0);
});
});

View File

@ -1,5 +1,4 @@
import { mount } from '@vue/test-utils';
import * as Vue from 'vue';
import moment from 'moment';
import MockDate from 'mockdate';
import { sleep } from '../../../tests/utils';
@ -178,7 +177,7 @@ describe('Locale Provider', () => {
});
locales.forEach(locale => {
it(`should display the text as ${locale.locale}`, done => {
it(`should display the text as ${locale.locale}`, async () => {
const wrapper = mount(
{
render() {
@ -191,10 +190,8 @@ describe('Locale Provider', () => {
},
{ sync: false, attachTo: 'body' },
);
Vue.nextTick(() => {
expect(wrapper.html()).toMatchSnapshot();
done();
});
await sleep();
expect(wrapper.html()).toMatchSnapshot();
});
});

View File

@ -44,7 +44,7 @@ exports[`Slider should show tooltip when hovering slider handler 2`] = `
<div style="position: absolute; top: 0px; left: 0px; width: 100%;">
<div>
<!---->
<div class="ant-tooltip ant-slider-tooltip ant-tooltip-placement-top zoom-down-leave" style="left: -999px; top: -1003px;">
<div class="ant-tooltip ant-slider-tooltip ant-tooltip-placement-top" style="left: -999px; top: -1003px; display: none;">
<div class="ant-tooltip-content">
<div class="ant-tooltip-arrow">
<!---->

View File

@ -22,6 +22,6 @@ describe('Slider', () => {
});
await asyncExpect(() => {
expect(document.body.innerHTML).toMatchSnapshot();
});
}, 0);
});
});