validate.test.js 823 字节
Newer Older
A
Anne_LXM 已提交
1 2 3 4 5 6
describe('pages/clientDB/validate/validate.vue', () => {

	let page
	beforeAll(async () => {
		// 重新reLaunch至首页,并获取首页page对象(其中 program 是uni-automator自动注入的全局对象)
		page = await program.reLaunch('/pages/clientDB/validate/validate')
A
Anne_LXM 已提交
7
		await page.waitFor('view')
A
Anne_LXM 已提交
8 9 10 11 12 13 14 15
		page = await program.currentPage()
	})
	
	it('点击切换navBar', async () => {
		//expect.assertions(1);
		const segmentedControl = await page.$('.segmented-control')
		
		const seControl = await segmentedControl.$$('.segmented-control__item')
A
Anne_LXM 已提交
16 17 18
		console.log('seControl: ',seControl);
		console.log(await seControl[0].text());
		// expect(await seControl[0].text()).toBe('实例demo')
A
Anne_LXM 已提交
19 20 21 22 23 24 25 26 27 28
		
		await seControl[1].tap()
		await page.waitFor(300)
		
		await seControl[2].tap()
		await page.waitFor(300)
		
	})

})