From 74436c54fedad82eee50f3db3ed5b80179ff6027 Mon Sep 17 00:00:00 2001 From: zhenyuWang <13641039885@163.com> Date: Sat, 18 Nov 2023 15:29:14 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E4=BC=98=E5=8C=96=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/checkbox/checkbox.test.js | 2 +- pages/component/general-event/general-event.test.js | 4 ++-- pages/component/progress/progress.test.js | 8 ++++---- pages/component/radio/radio.test.js | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pages/component/checkbox/checkbox.test.js b/pages/component/checkbox/checkbox.test.js index 37d06259..e6df2c26 100644 --- a/pages/component/checkbox/checkbox.test.js +++ b/pages/component/checkbox/checkbox.test.js @@ -8,7 +8,7 @@ function getData(key = '') { let page beforeAll(async () => { page = await program.reLaunch('/pages/component/checkbox/checkbox') - await page.waitFor(1000) + await page.waitFor(2000); }) describe('Checkbox.uvue', () => { diff --git a/pages/component/general-event/general-event.test.js b/pages/component/general-event/general-event.test.js index ded3853e..7bb717eb 100644 --- a/pages/component/general-event/general-event.test.js +++ b/pages/component/general-event/general-event.test.js @@ -53,8 +53,8 @@ describe('event trigger sequence', () => { ], }) const data = await page.data() - expect(data.onTouchStartTime).toBeLessThan(data.onTouchMoveTime) - expect(data.onTouchMoveTime).toBeLessThan(data.onTouchEndTime) + expect(data.onTouchStartTime).toBeLessThanOrEqual(data.onTouchMoveTime); + expect(data.onTouchMoveTime).toBeLessThanOrEqual(data.onTouchEndTime); }) it('click', async () => { diff --git a/pages/component/progress/progress.test.js b/pages/component/progress/progress.test.js index 2ce1304e..a29b5a5b 100644 --- a/pages/component/progress/progress.test.js +++ b/pages/component/progress/progress.test.js @@ -8,7 +8,7 @@ function getData(key = '') { let page beforeAll(async () => { page = await program.reLaunch('/pages/component/progress/progress') - await page.waitFor(1000) + await page.waitFor(2000); }) describe('Progress.uvue', () => { @@ -17,14 +17,14 @@ describe('Progress.uvue', () => { const p1 = await page.$('.p1') const p2 = await page.$('.p2') const p3 = await page.$('.p3') - await page.callMethod('setProgress') + await page.callMethod('setProgress') await page.waitFor(1000) expect(await p.property('percent')).toEqual(20) expect(await p1.property('percent')).toEqual(40) expect(await p2.property('percent')).toEqual(60) expect(await p3.property('percent')).toEqual(80) expect(await getData('curPercent')).toEqual(20) - await page.callMethod('clearProgress') + await page.callMethod('clearProgress') await page.waitFor(1000) expect(await p.property('percent')).toEqual(0) expect(await p1.property('percent')).toEqual(0) @@ -76,4 +76,4 @@ describe('Progress.uvue', () => { }) expect(await el.property('background-color')).toEqual('#007aff') }) -}) +}) diff --git a/pages/component/radio/radio.test.js b/pages/component/radio/radio.test.js index 696ca069..0ea3241c 100644 --- a/pages/component/radio/radio.test.js +++ b/pages/component/radio/radio.test.js @@ -8,7 +8,7 @@ function getData(key = '') { let page beforeAll(async () => { page = await program.reLaunch('/pages/component/radio/radio') - await page.waitFor(1000) + await page.waitFor(2000); }) describe('Radio.uvue', () => { -- GitLab