提交 bfa0596d 编写于 作者: zhaofengliang920817's avatar zhaofengliang920817

调整 show-toast 测试示例。

上级 e5e9c009
......@@ -53,6 +53,13 @@ describe('API-toast', () => {
}
})
it("icon=none-mask=true-toast-test", async () => {
await page.setData({maskSelect: true})
await page.callMethod('toast3Tap')
await page.waitFor(300);
await toScreenshot('icon=none-mask=true-toast-image')
})
it("image-toast-test", async () => {
await page.setData({imageSelect: true})
await page.waitFor(300);
......
......@@ -157,6 +157,22 @@
},
})
},
toast3Tap: function () {
uni.showToast({
title: "默认",
icon: 'none',
duration: this.intervalSelect,
image: this.imageSelect ? "/static/uni.png" : null,
mask: this.maskSelect,
success: (res) => {
// console.log('success:',res)
this.exeRet = "success:" + JSON.stringify(res)
},
fail: (res) => {
this.exeRet = "fail:" + JSON.stringify(res)
},
})
},
// #ifdef APP
toast2Tap: function () {
let positionValue = this.position_enum[this.position_current].value
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册