提交 973ea61b 编写于 作者: 雪洛's avatar 雪洛

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

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