From cfe232b590c5c794ed401c109ba76fb795c01d2f Mon Sep 17 00:00:00 2001 From: Anne_LXM Date: Tue, 2 Jul 2024 19:15:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=B5=8B=E8=AF=95=E9=A1=BA?= =?UTF-8?q?=E5=BA=8F/=E5=A2=9E=E5=8A=A0=E7=AD=89=E5=BE=85=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/list/list.test.js | 6 +++++- testSequencer.js | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pages/list/list.test.js b/pages/list/list.test.js index 9423526..d49e24b 100644 --- a/pages/list/list.test.js +++ b/pages/list/list.test.js @@ -17,7 +17,11 @@ describe('list', () => { }) it('检测标题', async () => { expect.assertions(1); - await page.waitFor(5000) + if(process.env.UNI_PLATFORM === "mp-weixin"){ + await page.waitFor(8000) + }else{ + await page.waitFor(3000) + } const getTitle = await page.data('dataList') console.log('getTitle: ', getTitle); expect(getTitle.title).toBe('阿里小程序IDE官方内嵌uni-app,为开发者提供多端开发服务') diff --git a/testSequencer.js b/testSequencer.js index 204b300..96c11e0 100644 --- a/testSequencer.js +++ b/testSequencer.js @@ -1,5 +1,5 @@ const Sequencer = require("@jest/test-sequencer").default; -const sortTestFilenames = ["grid.test.js","list.test.js","search.test.js","about.test.js","register.test.js","login-withpwd.test.js","userinfo.test.js","ucenter.test.js","settings.test.js","pages.test.js"]; +const sortTestFilenames = ["register.test.js","grid.test.js","list.test.js","search.test.js","about.test.js","login-withpwd.test.js","userinfo.test.js","ucenter.test.js","settings.test.js","pages.test.js"]; class CustomSequencer extends Sequencer { sort(tests) { // 测试例排序 -- GitLab