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

test fix locked

上级 47616d53
const PAGE_PATH = '/pages/list/list'
describe('list', () => {
let page, containsVite, isApp;
containsVite = process.env.UNI_CLI_PATH.includes('uniapp-cli-vite')
isApp = process.env.UNI_PLATFORM.includes('app')
if (containsVite && isApp) {
it('vue3', async () => {
expect(1).toBe(1)
})
return
}
beforeAll(async () => {
page = await program.switchTab(PAGE_PATH)
await page.waitFor('view')
await page.setData({'isTest': true})
})
it('检测标题', async () => {
expect.assertions(1);
await page.waitFor(5000)
const getTitle = await page.data('dataList')
console.log('getTitle: ', getTitle);
expect(getTitle.title).toBe('阿里小程序IDE官方内嵌uni-app,为开发者提供多端开发服务')
})
it('点击搜索跳转', async () => {
await page.callMethod('searchClick')
await page.waitFor(300)
})
let page, containsVite, isApp, currentPage;
containsVite = process.env.UNI_CLI_PATH.includes('uniapp-cli-vite')
isApp = process.env.UNI_PLATFORM.includes('app')
if (containsVite && isApp) {
it('vue3', async () => {
expect(1).toBe(1)
})
return
}
beforeAll(async () => {
page = await program.switchTab(PAGE_PATH)
await page.waitFor('view')
await page.setData({
'isTest': true
})
})
it('检测标题', async () => {
expect.assertions(1);
await page.waitFor(5000)
const getTitle = await page.data('dataList')
console.log('getTitle: ', getTitle);
expect(getTitle.title).toBe('阿里小程序IDE官方内嵌uni-app,为开发者提供多端开发服务')
})
it('点击搜索跳转详情页', async () => {
const items = await page.$('.uni-list-item')
await items.tap()
await page.waitFor(3000)
await page.waitFor('view')
currentPage = await program.currentPage()
console.log('currentPage: ', currentPage);
expect(currentPage.path).toBe('pages/list/detail')
})
})
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册