From 9791231e63a5051be1bdf4f9e53875af8616f13a Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Wed, 15 Dec 2021 23:29:15 +0800 Subject: [PATCH] test: update snap --- .../__tests__/__snapshots__/other.test.js.snap | 2 +- components/date-picker/__tests__/other.test.js | 11 ++++------- .../slider/__tests__/__snapshots__/index.test.js.snap | 4 ++-- components/slider/__tests__/index.test.js | 4 ++-- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/components/date-picker/__tests__/__snapshots__/other.test.js.snap b/components/date-picker/__tests__/__snapshots__/other.test.js.snap index 31541c514..28fdef502 100644 --- a/components/date-picker/__tests__/__snapshots__/other.test.js.snap +++ b/components/date-picker/__tests__/__snapshots__/other.test.js.snap @@ -77,7 +77,7 @@ exports[`MonthPicker and WeekPicker render WeekPicker 1`] = `
-
+
diff --git a/components/date-picker/__tests__/other.test.js b/components/date-picker/__tests__/other.test.js index f187764fe..b6965cc47 100644 --- a/components/date-picker/__tests__/other.test.js +++ b/components/date-picker/__tests__/other.test.js @@ -65,12 +65,9 @@ describe('MonthPicker and WeekPicker', () => { it('render WeekPicker', async () => { const birthday = dayjs('2000-01-01', 'YYYY-MM-DD').locale('zh-cn'); const wrapper = mount(WeekPicker, { props: { open: false }, sync: false }); - await asyncExpect(() => { - wrapper.setProps({ value: birthday, open: true }); - }); - await sleep(50); - await asyncExpect(() => { - expect(document.body.innerHTML).toMatchSnapshot(); - }, 0); + await sleep(10); + wrapper.setProps({ value: birthday, open: true }); + await sleep(1000); + expect(document.body.innerHTML).toMatchSnapshot(); }); }); diff --git a/components/slider/__tests__/__snapshots__/index.test.js.snap b/components/slider/__tests__/__snapshots__/index.test.js.snap index ddac5dc88..9b8b02f7e 100644 --- a/components/slider/__tests__/__snapshots__/index.test.js.snap +++ b/components/slider/__tests__/__snapshots__/index.test.js.snap @@ -16,7 +16,7 @@ exports[`Slider should show tooltip when hovering slider handler 1`] = `
-
+
@@ -42,7 +42,7 @@ exports[`Slider should show tooltip when hovering slider handler 2`] = `
-
+