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 0dac9515ba87ffe3ab0e3391babb05408f4487a2..17778e6da2c061e3d49d9eff00c88d073ff710b2 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) }); -}); +});