提交 bb0a0961 编写于 作者: Anne_LXM's avatar Anne_LXM

test:setTimeout

上级 d178c862
// jest官方文档: https://www.jestjs.cn/ // jest官方文档: https://www.jestjs.cn/
// uniapp自动化测试教程: https://uniapp.dcloud.io/collocation/auto/quick-start // uniapp自动化测试教程: https://uniapp.dcloud.io/collocation/auto/quick-start
const PAGE_PATH = '/pages/grid/grid' const PAGE_PATH = '/pages/grid/grid'
jest.setTimeout(15000)
describe('grid', () => { describe('grid', () => {
let page, hasLogin; let page, hasLogin;
beforeAll(async () => { beforeAll(async () => {
page = await program.switchTab(PAGE_PATH) page = await program.switchTab(PAGE_PATH)
console.log('page',page)
await page.waitFor('view') await page.waitFor('view')
}) })
it('检测宫格', async () => { it('检测宫格', async () => {
await page.waitFor(2000)
hasLogin = await page.data('hasLogin') hasLogin = await page.data('hasLogin')
let gridList = await page.data('gridList') let gridList = await page.data('gridList')
console.log("gridList", hasLogin,gridList.length) console.log("gridList", hasLogin,gridList.length)
......
...@@ -34,7 +34,6 @@ describe('settings', () => { ...@@ -34,7 +34,6 @@ describe('settings', () => {
console.log('bottom-back-text',bottomEl,await bottomEl.text()) console.log('bottom-back-text',bottomEl,await bottomEl.text())
expect(await bottomEl.text()).toBe('退出登录') expect(await bottomEl.text()).toBe('退出登录')
await page.callMethod('changeLoginState') await page.callMethod('changeLoginState')
await page.waitFor(500) await page.waitFor(1000)
console.log(await program.currentPage());
}) })
}); });
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册