From 093b1309a73534c8eb9fb376a07b0255861ded22 Mon Sep 17 00:00:00 2001 From: Anne_LXM Date: Wed, 12 Jun 2024 22:20:21 +0800 Subject: [PATCH] =?UTF-8?q?test(scroll-view-refresher):=20=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E5=85=BC=E5=AE=B9=20iOS=20=E7=AB=AF=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/scroll-view/scroll-view-refresher.test.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pages/component/scroll-view/scroll-view-refresher.test.js b/pages/component/scroll-view/scroll-view-refresher.test.js index 3fdd958e..cc537975 100644 --- a/pages/component/scroll-view/scroll-view-refresher.test.js +++ b/pages/component/scroll-view/scroll-view-refresher.test.js @@ -32,8 +32,8 @@ describe('component-native-scroll-view-refresher', () => { // 手动设置下拉刷新状态refresher-triggered为true时,在web和iOS不触发@refresherpulling事件 if(process.env.uniTestPlatformInfo.startsWith('android')){ expect(await page.data('onRefresherpullingTest')).toBe('refresherpulling:Success') + expect(await page.data('refresherrefreshTest')).toBe('refresherrefresh:Success') } - expect(await page.data('refresherrefreshTest')).toBe('refresherrefresh:Success') await page.waitFor(1000); expect(await page.data('onRefresherrestoreTest')).toBe('refresherrestore:Success') }); @@ -47,7 +47,10 @@ describe('component-native-scroll-view-refresher', () => { duration: 1000 }) await page.waitFor(1500) - expect(await page.data('onRefresherabortTest')).toBe('refresherabort:Success') + // 下拉刷新被中止,在iOS不触发@refresherabort事件 + if(process.env.UNI_UTS_PLATFORM.startsWith('app-android')){ + expect(await page.data('onRefresherabortTest')).toBe('refresherabort:Success') + } }); } -- GitLab