提交 4f4f787e 编写于 作者: A Anne_LXM

update test

上级 9bb76589
......@@ -36,7 +36,6 @@ describe('pages/clientDB/demo/demo.vue', () => {
})
//新增一条留言
const userWrite = await page.callMethod('submitComment', '我是用户')
console.log('userWrite: ',userWrite);
expect(userWrite.id.length).toBe(24);
})
it('审核员', async () => {
......
......@@ -5,9 +5,7 @@ describe('pages/clientDB/permission/permission.vue', () => {
page = await program.reLaunch('/pages/clientDB/permission/permission')
await page.waitFor('view')
page = await program.currentPage()
})
it('获取数据',async()=>{
//expect.assertions(2)
if(process.env.UNI_PLATFORM === "mp-weixin"){
......
jest.setTimeout(20000)
describe('pages/cloudFunction/cloudFunction.vue', () => {
let page
beforeAll(async () => {
// 重新reLaunch至首页,并获取首页page对象(其中 program 是uni-automator自动注入的全局对象)
......@@ -9,7 +9,7 @@ describe('pages/cloudFunction/cloudFunction.vue', () => {
it('云函数页-检查标题',async()=>{
expect.assertions(1);
const title = await page.$('.title')
expect(await title.text()).toBe('基础示例-云函数');
expect((await title.text()).trim()).toBe('基础示例-云函数');
})
it('添加一条数据',async()=>{
expect.assertions(1);
......
jest.setTimeout(20000)
describe('pages/storage/ext-storage-qiniu.vue', () => {
let page,platform;
beforeAll(async () => {
......
jest.setTimeout(20000)
describe('pages/storage/space-storage.vue', () => {
let page
beforeAll(async () => {
......
......@@ -16,6 +16,8 @@ describe('pages/user-info/detail.vue', () => {
await page.waitFor(1000)
console.log('currentPage',await program.currentPage())
expect((await program.currentPage()).path).toBe('pages/user-info/edit')
}else{
console.log('err query')
}
})
})
\ No newline at end of file
......@@ -9,6 +9,7 @@ describe('pages/user-info/detail.vue', () => {
it('修改表单内容', async () => {
const getQuery = await page.query
console.log('getQuery: ',getQuery);
if(!getQuery.id || getQuery.hobby_valuetotext.length<0)return;
await page.setData({
"formData": {
"username":"林小明加",
......
......@@ -24,9 +24,6 @@ describe('pages/user-info/list.vue', () => {
it('点击第一条',async()=>{
await page.waitFor(2000)
const items = await page.$$('.uni-list-item')
console.log('items: ',items);
if(items.length<0)return;
if(items.length>0){
await items[0].tap()
await waitTime()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册