ucenter.test.js 783 字节
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
describe('pages/ucenter/ucenter.vue', () => {

	let page
	beforeAll(async () => {
		page = await program.switchTab('/pages/ucenter/ucenter')
		await page.waitFor(300)
	})

	it('宫格', async () => {
		const getGrid = await page.data('gridList')
		// console.log("getGrid: ",getGrid);
		expect(getGrid.length).toBe(4)
	})

	it('列表', async () => {
		const getUcenterList = await page.data('ucenterList')
		// console.log("getUcenterList: ",getUcenterList);
		expect(getUcenterList.length).toBe(3)
	})

	it('我的积分', async () => {
		// expect.assertions(1);
study夏羽's avatar
study夏羽 已提交
23
		await page.waitFor(300)
study夏羽's avatar
study夏羽 已提交
24 25
		const getScoreRes = await page.callMethod('getScore')
		console.log("getScoreRes: ", getScoreRes);
study夏羽's avatar
study夏羽 已提交
26
		// await page.waitFor(500)
study夏羽's avatar
study夏羽 已提交
27 28 29 30 31
		// expect(getScoreRes.score).not.toBeUndefined();
	})


})