提交 666b0616 编写于 作者: A Anne_LXM

update test

上级 d036fe46
......@@ -7,7 +7,7 @@ describe('pages/ucenter/settings/settings', () => {
page = await program.navigateTo('/pages/ucenter/settings/settings')
await page.waitFor('view')
uniToken = await program.callUniMethod('getStorageSync', 'uni_id_token')
// console.log("uniToken: ",uniToken);
console.log("uniToken: ",uniToken);
if(!uniToken)return;
} catch (err) {
console.log("err: ",err);
......@@ -26,12 +26,9 @@ describe('pages/ucenter/settings/settings', () => {
expect((await el.$$('.mt10')).length).toBe(2)
}
})
it('screenshot',async()=>{
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
await page.waitFor(500);
})
it('退出登录', async () => {
if(!uniToken)return;
const bottomEl = await page.$('.bottom-back-text')
expect(await bottomEl.text()).toBe('退出登录')
await page.callMethod('changeLoginState')
......
......@@ -32,14 +32,13 @@ describe('uni_modules/uni-id-pages/pages/userinfo/userinfo.vue', () => {
// console.log("elBox: ",elBox);
await elBox.callMethod('setAvatarFile',avatar_file)
await page.waitFor(500)
await program.screenshot({
path: "static/screenshot/userinfo.png" // 默认项目根目录
})
}else{
await page.waitFor(500)
await program.screenshot({
path: "static/screenshot/userinfo-mp.png" // 默认项目根目录
})
}
})
it("screenshot", async () => {
if(!uniToken)return;
await program.screenshot({
path: "static/screenshot/userinfo.png" // 默认项目根目录
})
await page.waitFor(500)
})
});
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册