diff --git a/env.js b/env.js index 4b3f357ce09d3fbc23c95038dbed701904d3c85a..14c906f6a2e9816f85696d379af124564acb6fb7 100644 --- a/env.js +++ b/env.js @@ -1,30 +1,30 @@ module.exports = { - "compile": true, - "h5": { - "options": { - "headless": false - }, - "executablePath": "C:/Program Files/Google/Chrome/Application/chrome.exe" - }, - "mp-weixin": { - "port": 9420, - "account": "", - "args": "", - "cwd": "", - "launch": true, - "teardown": "disconnect", - "remote": false, - "executablePath": "C:/Users/liuxi/download/微信web开发者工具/cli.bat" - }, - "app-plus": { - "android": { - "id": "", - "executablePath": "D:/HX/alpha-3.1.3/HBuilderX/plugins/launcher/base/android_base.apk" - }, - "version": "", - "ios": { - "id": "", - "executablePath": "" - } - } + "compile": true, + "h5": { + "options": { + "headless": false + }, + "executablePath": "C:/Program Files/Google/Chrome/Application/chrome.exe" + }, + "mp-weixin": { + "port": 9420, + "account": "", + "args": "", + "cwd": "", + "launch": true, + "teardown": "disconnect", + "remote": false, + "executablePath": "C:/Users/liuxi/download/微信web开发者工具/cli.bat" + }, + "app-plus": { + "android": { + "id": "d3a144fa", + "executablePath": "D:\\HX\\alpha-3.1.3\\HBuilderX\\plugins\\launcher\\base\\android_base.apk" + }, + "version": "D:\\HX\\alpha-3.1.3\\HBuilderX\\plugins\\launcher\\base\\version.txt", + "ios": { + "id": "", + "executablePath": "" + } + } } diff --git a/pages/list/search/search.test.js b/pages/list/search/search.test.js index cfbb98f730f9a7b372ffc3e13795b37cee787721..9e17e7457191049d9297438351772e39223714f1 100644 --- a/pages/list/search/search.test.js +++ b/pages/list/search/search.test.js @@ -4,7 +4,7 @@ describe('pages/list/search/search.vue', () => { let page beforeAll(async () => { - page = await program.navigateTo('/pages/list/search/search') + page = await program.redirectTo('/pages/list/search/search') await page.waitFor(500) }) it('搜索发现-显示-影藏', async () => { diff --git a/pages/ucenter/login-page/pwd-login/pwd-login.test.js b/pages/ucenter/login-page/pwd-login/pwd-login.test.js index bf20f2c22829a2d1f5d6ff7e58517285dde0453e..598e1a358527e77088e145e7d2f8f09ddaa54f8b 100644 --- a/pages/ucenter/login-page/pwd-login/pwd-login.test.js +++ b/pages/ucenter/login-page/pwd-login/pwd-login.test.js @@ -16,23 +16,12 @@ describe('pages/ucenter/login-page/pwd-login/pwd-login.vue', () => { expect((await program.currentPage()).path).toBe( 'pages/ucenter/login-page/register/register') console.log(await program.currentPage(),"111111111"); - // await page.waitFor(500) + await page.waitFor(500) // 执行 navigateBack 验证是否返回navigateTo - // expect((await program.navigateBack()).path).toBe( - // 'pages/ucenter/login-page/pwd-login/pwd-login') - }) - - 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') + expect((await program.navigateBack()).path).toBe( + 'pages/ucenter/login-page/pwd-login/pwd-login') + + console.log(await program.currentPage(),"22222222222"); }) it('用户名密码登录', async () => { diff --git a/pages/ucenter/login-page/pwd-login/pwd-login.vue b/pages/ucenter/login-page/pwd-login/pwd-login.vue index 2a972e5adc0a018dd04bf784b4f24c0b48b278c2..30ea69a5ba202da7b3acca7e6243200f6ae7b4ce 100644 --- a/pages/ucenter/login-page/pwd-login/pwd-login.vue +++ b/pages/ucenter/login-page/pwd-login/pwd-login.vue @@ -159,9 +159,6 @@ uni.navigateTo({ url: '/pages/ucenter/login-page/register/register' }) - // uni.redirectTo({ - // url: '/pages/ucenter/login-page/register/register' - // }) } } } diff --git a/pages/ucenter/login-page/register/register.test.js b/pages/ucenter/login-page/register/register.test.js index 076c306be12f439df48c1e9f36f168cbb6ddd5a2..da5e5b6b40382205a2854713a94cb12f0e07faea 100644 --- a/pages/ucenter/login-page/register/register.test.js +++ b/pages/ucenter/login-page/register/register.test.js @@ -41,7 +41,6 @@ describe('pages/ucenter/login-page/register/register.vue', () => { await page.waitFor(300) return resRegister }) - console.log("getUid:---------- ",getUid.msg); if (getUid.uid) { expect(getUid.msg).toBe("注册成功"); diff --git a/pages/ucenter/userinfo/bind-mobile/bind-mobile.test.js b/pages/ucenter/userinfo/bind-mobile/bind-mobile.test.js index 2c87550f20bdedee9fdf201d51e147677f99052e..3166380a0a64a492502c8c71ef6445c849d4eefb 100644 --- a/pages/ucenter/userinfo/bind-mobile/bind-mobile.test.js +++ b/pages/ucenter/userinfo/bind-mobile/bind-mobile.test.js @@ -55,6 +55,10 @@ describe('pages/ucenter/userinfo/bind-mobile/bind-mobile.vue', () => { break; } } + + await program.switchTab('/pages/ucenter/ucenter') + + console.log(await program.currentPage(),"last-------------------"); }) }); \ No newline at end of file diff --git a/pages/ucenter/userinfo/userinfo.test.js b/pages/ucenter/userinfo/userinfo.test.js index 4daadde328c320fe286ff3d96fe3fdf11a2be0e2..5ee9bf6a68b34b521b9e1ef4989669c136c4c557 100644 --- a/pages/ucenter/userinfo/userinfo.test.js +++ b/pages/ucenter/userinfo/userinfo.test.js @@ -9,15 +9,14 @@ describe('pages/ucenter/userinfo/userinfo.vue', () => { }) - /* it('设置昵称', async () => { + it('设置昵称', async () => { const getTokenRes = await page.waitFor(async()=>{ return await page.data('uniToken') }) - console.log("getTokenRes: ",getTokenRes); + console.log("getTokenRes:---------------------- ",getTokenRes); var name = "数字天堂DCloud" + Math.round(Math.random()*10); console.log("name: ",name); - console.log(await page.data('uniToken'),"---------------------"); if(getTokenRes){ const nicknameRes = await page.callMethod("setNickname",name) await page.waitFor(300) @@ -25,15 +24,13 @@ describe('pages/ucenter/userinfo/userinfo.vue', () => { expect(nicknameRes.updated).toBe(1) } - }) */ + }) it('绑定手机号', async () => { - console.log(await page.data('uniToken'),"-------------------------"); await page.callMethod('bindMobileBySmsCode') await page.waitFor(300) - console.log((await program.currentPage()).path); - expect((await program.currentPage()).path).toBe('pages/ucenter/userinfo/bind-mobile/bind-mobile') - await page.waitFor(300) + // expect((await program.currentPage()).path).toBe('pages/ucenter/userinfo/bind-mobile/bind-mobile') + // await page.waitFor(300) expect((await program.navigateBack()).path).toBe('pages/ucenter/userinfo/userinfo') }) diff --git a/static/screenshot/about-mp.png b/static/screenshot/about-mp.png new file mode 100644 index 0000000000000000000000000000000000000000..761e211db5d87ead08a7ffc990a2bc5a5117bbe0 Binary files /dev/null and b/static/screenshot/about-mp.png differ