From ec65f06d8c54815db5e15e3cd12d03d06b8f0267 Mon Sep 17 00:00:00 2001 From: Anne_LXM Date: Mon, 5 Aug 2024 16:15:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0showToast=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/show-toast/show-toast.test.js | 15 +++++++++++++++ pages/API/show-toast/show-toast.uvue | 6 +++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/pages/API/show-toast/show-toast.test.js b/pages/API/show-toast/show-toast.test.js index 43dada28..9e868fd6 100644 --- a/pages/API/show-toast/show-toast.test.js +++ b/pages/API/show-toast/show-toast.test.js @@ -72,4 +72,19 @@ describe('API-toast', () => { await toScreenshot('toast-duration-end') }) + if(process.env.uniTestPlatformInfo.startsWith('web')){ + return + } + + it("position-toast-test", async () => { + const positions = await page.$$('.radio-position') + for (let i = 0; i < positions.length; i++) { + await positions[i].tap() + const positionsText = await positions[i].attribute('value') + await page.callMethod('toast2Tap') + await page.waitFor(100); + await toScreenshot(`position-${positionsText}`) + } + }) + }); diff --git a/pages/API/show-toast/show-toast.uvue b/pages/API/show-toast/show-toast.uvue index b8dc765e..a53b4caf 100644 --- a/pages/API/show-toast/show-toast.uvue +++ b/pages/API/show-toast/show-toast.uvue @@ -69,8 +69,8 @@ intervalSelect: 1500, position_current:0, position_enum: [ - { "value": "top", "name": "top: 居上显示" }, - { "value": "center", "name": "center: 居中显示" }, + { "value": "top", "name": "top: 居上显示(Android 暂不支持)" }, + { "value": "center", "name": "center: 居中显示(Android 暂不支持)" }, { "value": "bottom", "name": "bottom: 居底显示" }, ] as PositionItemType[], icon_current:0, @@ -148,7 +148,7 @@ image: this.imageSelect? "/static/uni.png" : null , mask: this.maskSelect, success: (res) => { - console.log('success:',res) + // console.log('success:',res) this.exeRet = "success:" + JSON.stringify(res) }, fail: (res) => { -- GitLab