diff --git a/pages/list/list.test.js b/pages/list/list.test.js index 94235265e76f223a01c0da57c08f6651f2e487e6..d49e24ba3356693de562cc3813b9f3b1ee45de97 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 204b3000cf931768a16115ce042688dd793d8713..96c11e074798d8f8609ebe471e40a176378c2746 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) { // 测试例排序