list.test.js 623 字节
Newer Older
study夏羽's avatar
study夏羽 已提交
1 2 3 4
describe('pages/list/list.vue', () => {
	let page
	beforeAll(async () => {
		page = await program.switchTab('/pages/list/list')
A
Anne_LXM 已提交
5
		await page.waitFor('view')
A
Anne_LXM 已提交
6
		if(process.env.UNI_PLATFORM === "mp-weixin"){await page.waitFor(2000)}
study夏羽's avatar
study夏羽 已提交
7 8
	})
	it('检测标题', async () => {
A
Anne_LXM 已提交
9
		expect.assertions(1);
A
Anne_LXM 已提交
10 11
		const getTitle = await page.data('dataList')
		console.log('getTitle: ',getTitle);
A
Anne_LXM 已提交
12
		expect((await page.data('dataList')).title).toBe('阿里小程序IDE官方内嵌uni-app,为开发者提供多端开发服务')
study夏羽's avatar
study夏羽 已提交
13 14
	})
	it('点击搜索跳转', async () => {
study夏羽's avatar
jest h5  
study夏羽 已提交
15
		await page.callMethod('searchClick')
A
Anne_LXM 已提交
16
		await page.waitFor(300)
study夏羽's avatar
study夏羽 已提交
17 18
	})
})