From fce1076c3ee4e660ecd3ccf87fafc9b3b9b7f6d4 Mon Sep 17 00:00:00 2001 From: Anne_LXM Date: Tue, 18 Jun 2024 15:37:02 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E8=B0=83=E6=95=B4=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/component/list-view/list-view.test.js | 2 +- pages/component/scroll-view/scroll-view-refresher.test.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/component/list-view/list-view.test.js b/pages/component/list-view/list-view.test.js index faac5e12..c48ca2f4 100644 --- a/pages/component/list-view/list-view.test.js +++ b/pages/component/list-view/list-view.test.js @@ -67,7 +67,7 @@ describe('component-native-list-view', () => { it('Event scrolltoupper-滚动到顶部/左边',async()=>{ // 滚动到顶部50,是否触发scrolltoupper事件 await page.callMethod('confirm_scroll_top_input', 50) - await page.waitFor(600) + await page.waitFor(1000) expect(await page.data('isScrolltoupperTest')).toBe('scrolltoupper:Success-top') }) diff --git a/pages/component/scroll-view/scroll-view-refresher.test.js b/pages/component/scroll-view/scroll-view-refresher.test.js index 7f24cc76..b4a8209b 100644 --- a/pages/component/scroll-view/scroll-view-refresher.test.js +++ b/pages/component/scroll-view/scroll-view-refresher.test.js @@ -38,7 +38,7 @@ describe('component-native-scroll-view-refresher', () => { expect(await page.data('onRefresherrestoreTest')).toBe('refresherrestore:Success') }); - // 仅App端支持手势下拉刷新 + // 仅App端支持手势下拉刷新,在不同设备上位置有差异可能导致不触发中止事件,安卓端仅测android 10 if(!process.env.uniTestPlatformInfo.startsWith('web')){ it('check_refresherabort', async () => { await program.swipe({ @@ -47,9 +47,9 @@ describe('component-native-scroll-view-refresher', () => { duration: 1000 }) await page.waitFor(1500) + console.log(process.env.uniTestPlatformInfo,'onRefresherabortTest',await page.data('onRefresherabortTest')) // 下拉刷新被中止,在iOS不触发@refresherabort事件 - if(process.env.UNI_UTS_PLATFORM.startsWith('app-android')){ - console.log('onRefresherabortTest',await page.data('onRefresherabortTest')) + if(process.env.uniTestPlatformInfo.startsWith('android 10')){ expect(await page.data('onRefresherabortTest')).toBe('refresherabort:Success') } }); -- GitLab