提交 9601656e 编写于 作者: Anne_LXM's avatar Anne_LXM

test 调整测试例

上级 80430261
......@@ -12,14 +12,11 @@ describe('settings', () => {
beforeAll(async () => {
page = await program.navigateTo('/pages/ucenter/settings/settings')
await page.waitFor('view')
hasLogin = await page.callMethod('hasLoginTest')
if (!hasLogin) {
console.log("未登录测试失败")
it('未登录', async () => {
expect(1).toBe(1)
})
return
}
hasLogin = await page.callMethod('hasLoginTest')
if (!hasLogin) {
console.log("未登录测试失败")
return
}
})
it('settings', async () => {
if (process.env.UNI_PLATFORM.startsWith("app")) {
......
......@@ -11,13 +11,11 @@ describe('ucenter', () => {
beforeAll(async () => {
page = await program.switchTab('/pages/ucenter/ucenter')
await page.waitFor('view')
hasLogin = await page.callMethod('hasLoginTest')
if (!hasLogin) {
console.log('未登录测试失败')
it('未登录', async () => {
expect(1).toBe(1)
})
}
hasLogin = await page.callMethod('hasLoginTest')
if (!hasLogin) {
console.log('未登录测试失败')
return
}
})
it('宫格', async () => {
expect.assertions(1);
......
......@@ -12,14 +12,13 @@ describe('userinfo', () => {
beforeAll(async () => {
page = await program.navigateTo(PAGE_PATH)
await page.waitFor("view")
userInfo = await page.callMethod('userInfoTest')
if (!userInfo._id) {
console.log("未登录测试失败",userInfo)
it('未登录', async () => {
expect(1).toBe(1)
})
userInfo = await page.callMethod('userInfoTest')
console.log("userInfo",userInfo)
if (!userInfo._id) {
console.log("未登录测试失败")
return
}
});
});
it("昵称", async () => {
const nickname = "数字天堂DCloud" + Math.round(Math.random() * 10);
await page.waitFor(300)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册