storage.test.js 726 字节
Newer Older
A
Anne_LXM 已提交
1
describe('pages/storage/storage.vue', () => {
study夏羽's avatar
study夏羽 已提交
2 3 4 5 6
	
	let page
	beforeAll(async () => {
	    // 重新reLaunch至首页,并获取首页page对象(其中 program 是uni-automator自动注入的全局对象)
	    page = await program.reLaunch('/pages/storage/storage')
A
Anne_LXM 已提交
7
	    await page.waitFor('view')
study夏羽's avatar
study夏羽 已提交
8 9 10 11 12 13 14
	    page = await program.currentPage()
	})
	
	it('云存储页-检查标题',async()=>{
		//expect.assertions(1);
		const content = await page.$('.content')
		const title = await content.$('.title')
A
Anne_LXM 已提交
15
		console.log('content: ',content,await title.text());
study夏羽's avatar
study夏羽 已提交
16 17 18 19 20 21 22 23
		expect(await title.text()).toBe('直接上传文件到云存储');
	})
	
	// it('上传文件',async()=>{
	// 	const upload = await page.callMethod('upload')
	// })
	
})