提交 8c18d6e3 编写于 作者: A Anne_LXM

update test

上级 d34373fa
......@@ -38,11 +38,10 @@ describe('pages/clientDB/demo/demo.vue', () => {
return userRole === 'user'
})
console.log("用户: ",user);
if(user){
//新增一条留言
const userWrite = await page.callMethod('submitComment', '我是用户')
expect(userWrite.id).toHaveLength(24);
}
//新增一条留言
const userWrite = await page.callMethod('submitComment', '我是用户')
console.log('userWrite: ',userWrite);
expect(userWrite.id).toHaveLength(24);
})
it('审核员', async () => {
await roles[2].tap()
......@@ -59,6 +58,7 @@ describe('pages/clientDB/demo/demo.vue', () => {
if(auditor){
//新增一条留言
const auditorWrite = await page.callMethod('submitComment', '我是审核员11')
console.log('auditorWrite: ',auditorWrite);
const audId = auditorWrite.id
expect(audId).not.toBeUndefined();
await page.waitFor(500)
......@@ -98,6 +98,7 @@ describe('pages/clientDB/demo/demo.vue', () => {
if(admin){
//管理员写入一条留言
const adminWrite = await page.callMethod('submitComment','我是管理员')
console.log('adminWrite: ',adminWrite);
var admId = adminWrite.id
expect(admId).not.toBeUndefined();
await page.waitFor(500)
......
......@@ -131,12 +131,12 @@
async getNoticeData() {
let res = await db.action('add_view_count')
.collection('opendb-notice')
.doc("65365ac355b3379a66170144")
.doc("65365ac355b3379a66170144")
.field('data,_id,update_time,view_count')
.get();
console.log("res: ",res);
this.noticeData = res.result.data[0]
this.options.where = `state == 1 && notice_id == "${this.noticeData._id}"`
this.options.where = `state == 1 && notice_id == "${this.noticeData._id}"`
},
async clickIcon(e, item) {
if (e) {
......@@ -231,7 +231,7 @@
}
this.$refs.dialog.close()
return await db.collection('opendb-notice-comment').add({
notice_id:this.noticeData._id,
notice_id:this.noticeData._id,
text
}).then(res => {
console.log(res);
......
......@@ -5,7 +5,6 @@ describe('pages/user-info/detail.vue', () => {
// page = await program.navigateTo('/pages/user-info/detail')
page = await program.currentPage()
await page.waitFor('view')
// console.log('page: ',page);
})
it('点击修改',async()=>{
// expect.assertions(1);
......
......@@ -8,6 +8,7 @@ describe('pages/user-info/list.vue', () => {
})
it('点击fab跳转到添加页',async()=>{
await page.callMethod('fabClick')
await page.waitFor(500)
currentPage = await program.currentPage()
expect(currentPage.path).toBe('pages/user-info/add')
await program.navigateBack()
......@@ -17,7 +18,6 @@ describe('pages/user-info/list.vue', () => {
await items[0].tap()
await page.waitFor(500)
currentPage = await program.currentPage()
// console.log('currentPage:---3 ',currentPage);
expect(currentPage.path).toBe('pages/user-info/detail')
// await program.navigateBack()
// console.log('currentPage',await program.currentPage())
......
// 扩展存储自定义域名
var domain; // 如果只有一个域名,域名可以直接写在这里
var domain = 'jest-ext-storage-aliyun.dcloud.net.cn'; // 如果只有一个域名,域名可以直接写在这里
module.exports = {
_before() {
if (!domain) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册