From c2f2e1b19c74b6509508e5e5b5b392355be0c493 Mon Sep 17 00:00:00 2001 From: Anne_LXM Date: Wed, 21 Aug 2024 14:31:52 +0800 Subject: [PATCH] =?UTF-8?q?test(scroll-view.test.js/):=20=E6=94=BE?= =?UTF-8?q?=E5=BC=80=E6=89=93=E5=8D=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/scroll-view/scroll-view.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/component/scroll-view/scroll-view.test.js b/pages/component/scroll-view/scroll-view.test.js index 130281b4..09d8bce5 100644 --- a/pages/component/scroll-view/scroll-view.test.js +++ b/pages/component/scroll-view/scroll-view.test.js @@ -22,7 +22,7 @@ describe('component-native-scroll-view', () => { await page.waitFor(1000) // 设置top 是否触发scroll 事件 const topScrollDetail = await page.data('scrollDetailTest') - // console.log('topScrollDetail:', topScrollDetail) + console.log('topScrollDetail:', topScrollDetail) expect(topScrollDetail.scrollLeft).toBe(0) // Android 差异scrollTop:99.809525 expect([100, 99.809525]).toContain(topScrollDetail.scrollTop); @@ -36,10 +36,10 @@ describe('component-native-scroll-view', () => { it('Event scroll-horizontal',async()=>{ // 横向滚动 await page.setData({scrollLeft:220}) - await page.waitFor(600) + await page.waitFor(1000) //设置left 是否触发scroll 事件 const leftScrollDetail = await page.data('scrollDetailTest') - // console.log('leftScrollDetail:', leftScrollDetail) + console.log('leftScrollDetail:', leftScrollDetail) // Android 差异scrollLeft:219.80952 expect([220, 219.80952]).toContain(leftScrollDetail.scrollLeft); expect(leftScrollDetail.scrollTop).toBe(0) @@ -69,7 +69,7 @@ describe('component-native-scroll-view', () => { if(!process.env.UNI_UTS_PLATFORM.startsWith('web')){ it('Event scrollend-滚动结束时触发仅App端支持',async()=>{ const endDetail = await page.data('scrollEndDetailTest') - // console.log('scrollEndDetailTest:', endDetail) + console.log('scrollEndDetailTest:', endDetail) expect(endDetail.scrollLeft).toBe(0) expect(endDetail.scrollTop).toBe(0) expect(endDetail.deltaY).toBe(0) -- GitLab