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

fix:修改昵称问题

上级 16eddae4
module.exports = { module.exports = {
"compile": true, "compile": true,
"h5": { "h5": {
"options": { "options": {
"headless": false "headless": false
}, },
"executablePath": "C:/Program Files/Google/Chrome/Application/chrome.exe" "executablePath": "C:/Program Files/Google/Chrome/Application/chrome.exe"
}, },
"mp-weixin": { "mp-weixin": {
"port": 9420, "port": 9420,
"account": "", "account": "",
"args": "", "args": "",
"cwd": "", "cwd": "",
"launch": true, "launch": true,
"teardown": "disconnect", "teardown": "disconnect",
"remote": false, "remote": false,
"executablePath": "C:/Users/liuxi/download/微信web开发者工具/cli.bat" "executablePath": "C:/Users/liuxi/download/微信web开发者工具/cli.bat"
}, },
"app-plus": { "app-plus": {
"android": { "android": {
"id": "", "id": "d3a144fa",
"executablePath": "D:/HX/alpha-3.1.3/HBuilderX/plugins/launcher/base/android_base.apk" "executablePath": "D:\\HX\\alpha-3.1.3\\HBuilderX\\plugins\\launcher\\base\\android_base.apk"
}, },
"version": "", "version": "D:\\HX\\alpha-3.1.3\\HBuilderX\\plugins\\launcher\\base\\version.txt",
"ios": { "ios": {
"id": "", "id": "",
"executablePath": "" "executablePath": ""
} }
} }
} }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
describe('pages/list/search/search.vue', () => { describe('pages/list/search/search.vue', () => {
let page let page
beforeAll(async () => { beforeAll(async () => {
page = await program.navigateTo('/pages/list/search/search') page = await program.redirectTo('/pages/list/search/search')
await page.waitFor(500) await page.waitFor(500)
}) })
it('搜索发现-显示-影藏', async () => { it('搜索发现-显示-影藏', async () => {
......
...@@ -16,23 +16,12 @@ describe('pages/ucenter/login-page/pwd-login/pwd-login.vue', () => { ...@@ -16,23 +16,12 @@ describe('pages/ucenter/login-page/pwd-login/pwd-login.vue', () => {
expect((await program.currentPage()).path).toBe( expect((await program.currentPage()).path).toBe(
'pages/ucenter/login-page/register/register') 'pages/ucenter/login-page/register/register')
console.log(await program.currentPage(),"111111111"); console.log(await program.currentPage(),"111111111");
// await page.waitFor(500) await page.waitFor(500)
// 执行 navigateBack 验证是否返回navigateTo // 执行 navigateBack 验证是否返回navigateTo
// expect((await program.navigateBack()).path).toBe( expect((await program.navigateBack()).path).toBe(
// 'pages/ucenter/login-page/pwd-login/pwd-login') 'pages/ucenter/login-page/pwd-login/pwd-login')
})
console.log(await program.currentPage(),"22222222222");
it('跳转到忘记密码页', async () => {
const resPwd = await page.callMethod('toRetrievePwd')
await page.waitFor(300)
expect((await program.currentPage()).path).toBe(
'pages/ucenter/login-page/pwd-retrieve/pwd-retrieve')
console.log(await program.currentPage(),"222222");
// await page.waitFor(500)
// 执行 navigateBack 验证是否返回
// expect((await program.navigateBack()).path).toBe(
// 'pages/ucenter/login-page/pwd-login/pwd-login')
}) })
it('用户名密码登录', async () => { it('用户名密码登录', async () => {
......
...@@ -159,9 +159,6 @@ ...@@ -159,9 +159,6 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/ucenter/login-page/register/register' url: '/pages/ucenter/login-page/register/register'
}) })
// uni.redirectTo({
// url: '/pages/ucenter/login-page/register/register'
// })
} }
} }
} }
......
...@@ -41,7 +41,6 @@ describe('pages/ucenter/login-page/register/register.vue', () => { ...@@ -41,7 +41,6 @@ describe('pages/ucenter/login-page/register/register.vue', () => {
await page.waitFor(300) await page.waitFor(300)
return resRegister return resRegister
}) })
console.log("getUid:---------- ",getUid.msg); console.log("getUid:---------- ",getUid.msg);
if (getUid.uid) { if (getUid.uid) {
expect(getUid.msg).toBe("注册成功"); expect(getUid.msg).toBe("注册成功");
......
...@@ -55,6 +55,10 @@ describe('pages/ucenter/userinfo/bind-mobile/bind-mobile.vue', () => { ...@@ -55,6 +55,10 @@ describe('pages/ucenter/userinfo/bind-mobile/bind-mobile.vue', () => {
break; break;
} }
} }
await program.switchTab('/pages/ucenter/ucenter')
console.log(await program.currentPage(),"last-------------------");
}) })
}); });
\ No newline at end of file
...@@ -9,15 +9,14 @@ describe('pages/ucenter/userinfo/userinfo.vue', () => { ...@@ -9,15 +9,14 @@ describe('pages/ucenter/userinfo/userinfo.vue', () => {
}) })
/* it('设置昵称', async () => { it('设置昵称', async () => {
const getTokenRes = await page.waitFor(async()=>{ const getTokenRes = await page.waitFor(async()=>{
return await page.data('uniToken') return await page.data('uniToken')
}) })
console.log("getTokenRes: ",getTokenRes); console.log("getTokenRes:---------------------- ",getTokenRes);
var name = "数字天堂DCloud" + Math.round(Math.random()*10); var name = "数字天堂DCloud" + Math.round(Math.random()*10);
console.log("name: ",name); console.log("name: ",name);
console.log(await page.data('uniToken'),"---------------------");
if(getTokenRes){ if(getTokenRes){
const nicknameRes = await page.callMethod("setNickname",name) const nicknameRes = await page.callMethod("setNickname",name)
await page.waitFor(300) await page.waitFor(300)
...@@ -25,15 +24,13 @@ describe('pages/ucenter/userinfo/userinfo.vue', () => { ...@@ -25,15 +24,13 @@ describe('pages/ucenter/userinfo/userinfo.vue', () => {
expect(nicknameRes.updated).toBe(1) expect(nicknameRes.updated).toBe(1)
} }
}) */ })
it('绑定手机号', async () => { it('绑定手机号', async () => {
console.log(await page.data('uniToken'),"-------------------------");
await page.callMethod('bindMobileBySmsCode') await page.callMethod('bindMobileBySmsCode')
await page.waitFor(300) await page.waitFor(300)
console.log((await program.currentPage()).path); // expect((await program.currentPage()).path).toBe('pages/ucenter/userinfo/bind-mobile/bind-mobile')
expect((await program.currentPage()).path).toBe('pages/ucenter/userinfo/bind-mobile/bind-mobile') // await page.waitFor(300)
await page.waitFor(300)
expect((await program.navigateBack()).path).toBe('pages/ucenter/userinfo/userinfo') 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.
先完成此消息的编辑!
想要评论请 注册