From 9aa8903341c21f3a6095612f5f9cea33d8e36454 Mon Sep 17 00:00:00 2001 From: zhenyuWang <13641039885@163.com> Date: Tue, 2 Jul 2024 17:45:38 +0800 Subject: [PATCH] =?UTF-8?q?test(pullDownRefresh):=20=E9=92=88=E5=AF=B9=20?= =?UTF-8?q?=20ios=20=E5=B9=B3=E5=8F=B0=E4=BC=98=E5=8C=96=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 --- .../API/pull-down-refresh/pull-down-refresh.test.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pages/API/pull-down-refresh/pull-down-refresh.test.js b/pages/API/pull-down-refresh/pull-down-refresh.test.js index 0dac9515..17778e6d 100644 --- a/pages/API/pull-down-refresh/pull-down-refresh.test.js +++ b/pages/API/pull-down-refresh/pull-down-refresh.test.js @@ -1,7 +1,10 @@ const PAGE_PATH = "/pages/API/pull-down-refresh/pull-down-refresh" +const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase() +const isIos = platformInfo.startsWith('ios') +const isWeb = platformInfo.startsWith('web') describe("payment", () => { - if (process.env.uniTestPlatformInfo.indexOf('web') > -1 || process.env.UNI_AUTOMATOR_APP_WEBVIEW === 'true') { + if (isWeb || process.env.UNI_AUTOMATOR_APP_WEBVIEW === 'true') { it('web || app-webview', () => { expect(1).toBe(1) }) @@ -16,6 +19,11 @@ describe("payment", () => { pulldownRefreshTriggered: false }) + if (isIos) { + // 暂时通过点击关闭授权弹框,避免影响 swipe 测试 + await program.tap({x: 100, y: 500}) + } + await program.swipe({ startPoint: { x: 100, @@ -30,4 +38,4 @@ describe("payment", () => { await page.waitFor(1500) expect(await page.data('pulldownRefreshTriggered')).toBe(true) }); -}); +}); -- GitLab