From 44362c9c6a95671a11b601c5426737e7f2a987dc Mon Sep 17 00:00:00 2001 From: zhenyuWang <13641039885@163.com> Date: Mon, 20 Nov 2023 15:53:58 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E4=BC=98=E5=8C=96=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=AD=89=E5=BE=85=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/navigator/new-page/onLoad.test.js | 38 ++++++++++----------- pages/component/progress/progress.test.js | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/pages/API/navigator/new-page/onLoad.test.js b/pages/API/navigator/new-page/onLoad.test.js index e72ba675..e44b8d81 100644 --- a/pages/API/navigator/new-page/onLoad.test.js +++ b/pages/API/navigator/new-page/onLoad.test.js @@ -55,63 +55,63 @@ describe("onLoad", () => { }); it("showToast", async () => { page = await program.reLaunch(INTERMEDIATE_PAGE_PATH); - await page.waitFor('view'); + await page.waitFor("view"); await page.callMethod("navigateToOnLoadWithType", "showToast"); - await page.waitFor(500); + await page.waitFor(1000); const image = await program.screenshot({ adb: true, area: { x: 0, y: 200, - height: 2140 - } + height: 2140, + }, }); expect(image).toMatchImageSnapshot(); - await page.waitFor('view'); + await page.waitFor("view"); }); it("showLoading", async () => { page = await program.reLaunch(INTERMEDIATE_PAGE_PATH); - await page.waitFor('view'); + await page.waitFor("view"); await page.callMethod("navigateToOnLoadWithType", "showLoading"); - await page.waitFor(500); + await page.waitFor(1000); const image = await program.screenshot({ adb: true, area: { x: 0, y: 200, - height: 2140 - } + height: 2140, + }, }); expect(image).toMatchImageSnapshot(); }); it("showModal", async () => { page = await program.reLaunch(INTERMEDIATE_PAGE_PATH); - await page.waitFor('view'); + await page.waitFor("view"); await page.callMethod("navigateToOnLoadWithType", "showModal"); - await page.waitFor(500); + await page.waitFor(1000); const image = await program.screenshot({ adb: true, area: { x: 0, y: 200, - height: 2140 - } + height: 2140, + }, }); expect(image).toMatchImageSnapshot(); }); it("showActionSheet", async () => { page = await program.reLaunch(INTERMEDIATE_PAGE_PATH); - await page.waitFor('view'); + await page.waitFor("view"); await page.callMethod("navigateToOnLoadWithType", "showActionSheet"); - await page.waitFor(500); + await page.waitFor(1000); const image = await program.screenshot({ adb: true, area: { x: 0, - y: 200, - height: 2140 - } + y: 200, + height: 2140, + }, }); expect(image).toMatchImageSnapshot(); }); -}); +}); diff --git a/pages/component/progress/progress.test.js b/pages/component/progress/progress.test.js index a29b5a5b..ea70b1d8 100644 --- a/pages/component/progress/progress.test.js +++ b/pages/component/progress/progress.test.js @@ -18,7 +18,7 @@ describe('Progress.uvue', () => { const p2 = await page.$('.p2') const p3 = await page.$('.p3') await page.callMethod('setProgress') - await page.waitFor(1000) + await page.waitFor(2000); expect(await p.property('percent')).toEqual(20) expect(await p1.property('percent')).toEqual(40) expect(await p2.property('percent')).toEqual(60) -- GitLab