diff --git a/pages/clientDB/permission-demo/permission-demo.test.js b/pages/clientDB/permission-demo/permission-demo.test.js index a9e40ea9b54529c31b906d914189b799f1025f46..26513e2a37f0a7f56672a97952800fb016c8dfea 100644 --- a/pages/clientDB/permission-demo/permission-demo.test.js +++ b/pages/clientDB/permission-demo/permission-demo.test.js @@ -22,7 +22,7 @@ describe('pages/clientDB/permission-demo/permission-demo.vue', () => { it('未登陆', async () => { await roles[0].tap() console.log('rulo_index: ',await page.data('rulo_index')); - expect(await roles[0].text()).toBe('未登陆') + expect((await roles[0].text()).trim()).toBe('未登陆') }) it('用户', async () => { diff --git a/pages/schema2code/schema2code.test.js b/pages/schema2code/schema2code.test.js index f2d30833fd7a428a5180b56b6022833a6187f6af..8df5b31b52b5349b507bdaac3b27e00a5d95940c 100644 --- a/pages/schema2code/schema2code.test.js +++ b/pages/schema2code/schema2code.test.js @@ -3,7 +3,7 @@ describe('pages/schema2code/schema2code.nvue', () => { let page beforeAll(async () => { // 重新reLaunch至首页,并获取首页page对象(其中 program 是uni-automator自动注入的全局对象) - page = await program.reLaunch('/pages/schema2code/schema2code') + page = await program.switchTab('/pages/schema2code/schema2code') await page.waitFor('view') page = await program.currentPage() })