提交 f1c74e4e 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

test: 优化测试例

上级 aa70ebd2
...@@ -22,7 +22,7 @@ describe('pages/clientDB/permission-demo/permission-demo.vue', () => { ...@@ -22,7 +22,7 @@ describe('pages/clientDB/permission-demo/permission-demo.vue', () => {
it('未登陆', async () => { it('未登陆', async () => {
await roles[0].tap() await roles[0].tap()
console.log('rulo_index: ',await page.data('rulo_index')); console.log('rulo_index: ',await page.data('rulo_index'));
expect(await roles[0].text()).toBe('未登陆') expect((await roles[0].text()).trim()).toBe('未登陆')
}) })
it('用户', async () => { it('用户', async () => {
......
...@@ -3,7 +3,7 @@ describe('pages/schema2code/schema2code.nvue', () => { ...@@ -3,7 +3,7 @@ describe('pages/schema2code/schema2code.nvue', () => {
let page let page
beforeAll(async () => { beforeAll(async () => {
// 重新reLaunch至首页,并获取首页page对象(其中 program 是uni-automator自动注入的全局对象) // 重新reLaunch至首页,并获取首页page对象(其中 program 是uni-automator自动注入的全局对象)
page = await program.reLaunch('/pages/schema2code/schema2code') page = await program.switchTab('/pages/schema2code/schema2code')
await page.waitFor('view') await page.waitFor('view')
page = await program.currentPage() page = await program.currentPage()
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册