diff --git a/pages/API/show-toast/show-toast.test.js b/pages/API/show-toast/show-toast.test.js index 43dada2824d8166e30363460e7f5b6fd197da68e..9e868fd6ebf587c4b3093f1c398a46154da716ef 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 b8dc765e0c5c2d8207272e71140b5a5d84d13704..a53b4cafc5ee214ef83b4ba5ee1022261991e587 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) => {