diff --git a/pages/grid/grid.test.js b/pages/grid/grid.test.js index 284014f72f5504eba8dfa4601a98107fce9d351a..72833815d959b8f0454ea172b18c35d69d32f1d0 100644 --- a/pages/grid/grid.test.js +++ b/pages/grid/grid.test.js @@ -1,13 +1,16 @@ // jest官方文档: https://www.jestjs.cn/ // uniapp自动化测试教程: https://uniapp.dcloud.io/collocation/auto/quick-start const PAGE_PATH = '/pages/grid/grid' +jest.setTimeout(15000) describe('grid', () => { let page, hasLogin; beforeAll(async () => { page = await program.switchTab(PAGE_PATH) + console.log('page',page) await page.waitFor('view') }) it('检测宫格', async () => { + await page.waitFor(2000) hasLogin = await page.data('hasLogin') let gridList = await page.data('gridList') console.log("gridList", hasLogin,gridList.length) diff --git a/pages/ucenter/settings/settings.test.js b/pages/ucenter/settings/settings.test.js index 5190ecdfad527c77c94e1d3b6a7100682c2f71af..c76f079c2c18fe83eed9dcc35a425fdeafc45b81 100644 --- a/pages/ucenter/settings/settings.test.js +++ b/pages/ucenter/settings/settings.test.js @@ -34,7 +34,6 @@ describe('settings', () => { console.log('bottom-back-text',bottomEl,await bottomEl.text()) expect(await bottomEl.text()).toBe('退出登录') await page.callMethod('changeLoginState') - await page.waitFor(500) - console.log(await program.currentPage()); + await page.waitFor(1000) }) });