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

增加 show-toast 截图测试脚本。

上级 27947385
...@@ -53,6 +53,13 @@ describe('API-toast', () => { ...@@ -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 () => { it("image-toast-test", async () => {
await page.setData({imageSelect: true}) await page.setData({imageSelect: true})
await page.waitFor(300); await page.waitFor(300);
......
...@@ -156,6 +156,22 @@ ...@@ -156,6 +156,22 @@
this.exeRet = "fail:" + JSON.stringify(res) this.exeRet = "fail:" + JSON.stringify(res)
}, },
}) })
},
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 // #ifdef APP
toast2Tap: function () { toast2Tap: function () {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册