grid.test.js 717 字节
Newer Older
study夏羽's avatar
study夏羽 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
// jest官方文档: https://www.jestjs.cn/
// uniapp自动化测试教程: https://uniapp.dcloud.io/collocation/auto/quick-start

describe('pages/grid/grid.vue', () => {
	let page
	beforeAll(async () => {
		page = await program.switchTab('/pages/grid/grid')
		await page.waitFor(500)
	})
	
	it('检测宫格', async () => {
		expect.assertions(1);
		const getData = await page.data('gridList')
		console.log("getData: ",getData);
		expect(getData.length).toBe(9)
		
	})
	
	it('点击宫格', async () => {
		// expect.assertions(1);
		const perPage = await page.$('.warp')
		const uGrid = await perPage.$('.uni-grid-box')
		console.log("uGrid-----------: ",uGrid);
		// await uGrid.callMethod('change')
	})
	
	
	
});