提交 e2c6a92a 编写于 作者: study夏羽's avatar study夏羽

update

上级 69989ccd
......@@ -11,18 +11,15 @@ describe('pages/ucenter/about/about.vue', () => {
it('about', async () => {
expect.assertions(2);
const getData = await page.data('about')
console.log("getData-----------: ", getData);
expect(getData.appName).toBe('uni-starter')
expect(getData.slogan).toBe('云端一体应用快速开发模版')
})
it('screenshot', async () => {
console.log(process.env.UNI_PLATFORM, "PLATFORM----------");
if (process.env.UNI_PLATFORM === "h5") {
const image = await program.screenshot({
path: "static/screenshot/about-h5.png" // 默认项目根目录
})
console.log(image, "image--------------------")
} else if (process.env.UNI_PLATFORM === "app-plus") {
await program.screenshot({
path: "static/screenshot/about-app.png"
......
......@@ -13,12 +13,10 @@ describe('pages/ucenter/settings/settings', () => {
if (process.env.UNI_PLATFORM === "app-plus") {
//清理缓存
await page.callMethod('clearTmp')
console.log("clearTmp: -------------");
console.log(await page.data('pushIsOn'), "pushIsOn-------------");
const pushRes = await page.data('pushIsOn')
if (pushRes == "wait") {
await page.callMethod('pushServer.off')
console.log("pushServer---------");
}
}
})
......
......@@ -25,26 +25,22 @@ describe('pages/ucenter/ucenter.vue', () => {
if (process.env.UNI_PLATFORM === "h5" || process.env.UNI_PLATFORM === "mp-weixin") {
await page.callMethod('signIn')
await page.waitFor(300)
const image = await program.screenshot({
await program.screenshot({
path: "static/screenshot/sign-h5.png" // 默认项目根目录 process.env.UNI_PLATFORM === "h5" ||
})
console.log(image, "image--------------------")
}
if (process.env.UNI_PLATFORM === "app-plus") {
const signInByAdRes = await page.callMethod('signInByAd')
console.log("signInByAdRes: ",signInByAdRes);
await page.waitFor(300)
const shareRes = await page.callMethod('share')
console.log("shareRes: ",shareRes);
await page.waitFor(300)
const imageApp = await program.screenshot({
await program.screenshot({
path: "static/screenshot/sign-app.png" // 默认项目根目录 process.env.UNI_PLATFORM === "h5" ||
})
console.log(imageApp, "imageApp--------------------")
}
})
......@@ -62,8 +58,6 @@ describe('pages/ucenter/ucenter.vue', () => {
} else {
console.log("签到失败");
}
// await page.waitFor(500)
})
......
......@@ -11,7 +11,6 @@ describe('pages/ucenter/userinfo/userinfo.vue', () => {
it('设置昵称', async () => {
const name = "数字天堂DCloud" + Math.round(Math.random()*10);
console.log("name: ",name);
await page.waitFor(300)
const nicknameRes = await page.callMethod("setNickname",name)
console.log("nicknameRes: ",nicknameRes);
......@@ -23,7 +22,6 @@ describe('pages/ucenter/userinfo/userinfo.vue', () => {
console.log("navRes: ",navRes);
await page.waitFor(300)
// expect((await program.currentPage()).path).toBe('pages/ucenter/userinfo/bind-mobile/bind-mobile')
// await page.waitFor(300)
console.log("currentPage---------------- ",await program.currentPage());
// expect((await program.navigateBack()).path).toBe('pages/ucenter/userinfo/userinfo')
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册