提交 7f4ebd35 编写于 作者: 雪洛's avatar 雪洛

test: 自动化测试环境下移除不必要的toast

上级 3765cb45
......@@ -41,9 +41,6 @@
showCancel: false
})
} else {
uni.showToast({
title: content
})
console.log(title, content)
}
},
......
......@@ -38,13 +38,6 @@
isUniTest: false
}
},
onLoad() {
},
onUnload() {
if (this.isUniTest) {
uni.hideToast()
}
},
computed: {
dataTag() : string {
return this.isUniTest ? 'default-tag' + Date.now() : 'default-tag'
......@@ -59,9 +52,6 @@
showCancel: false
})
} else {
uni.showToast({
title: content
})
console.log(title, content)
}
},
......
......@@ -42,11 +42,6 @@
isUniTest: false
}
},
onUnload() {
if (this.isUniTest) {
uni.hideToast()
}
},
methods: {
notify(content : string, title : string) {
if (!this.isUniTest) {
......@@ -56,9 +51,6 @@
showCancel: false
})
} else {
uni.showToast({
title: content
})
console.log(title, content)
}
},
......@@ -101,11 +93,6 @@
const error = err as UniCloudError
this.failErrCode = error.errCode as string
console.error(error)
if (this.isUniTest) {
uni.showToast({
title: error.errMsg
})
}
})
},
async failWithNumberErrCode() : Promise<void> {
......@@ -119,11 +106,6 @@
const error = err as UniCloudError
this.failNumberErrCode = error.errCode as number
console.error(error)
if (this.isUniTest) {
uni.showToast({
title: error.errMsg
})
}
})
},
async success() : Promise<void> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册