From 069343297a9c34ec0dc356f769c2c7b11ee48531 Mon Sep 17 00:00:00 2001 From: shutao Date: Thu, 28 Nov 2024 18:42:31 +0800 Subject: [PATCH] update grid-view.test.js list-view.test.js --- pages/component/grid-view/grid-view.test.js | 10 +++++----- pages/component/list-view/list-view.test.js | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pages/component/grid-view/grid-view.test.js b/pages/component/grid-view/grid-view.test.js index deb6dae2..583f15c2 100644 --- a/pages/component/grid-view/grid-view.test.js +++ b/pages/component/grid-view/grid-view.test.js @@ -2,7 +2,7 @@ const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase() const isMP = platformInfo.startsWith('mp') describe('component-native-grid-view', () => { - if (isMP) { + if (isMP || platformInfo.indexOf('web') > -1) { it('skip mp', () => { expect(1).toBe(1) }) @@ -14,7 +14,7 @@ describe('component-native-grid-view', () => { //打开grid-view测试页 page = await program.reLaunch('/pages/component/grid-view/grid-view') await page.waitFor(600) - }) + }) //检测竖向scrolltop属性赋值 it('check_scroll_top', async () => { @@ -63,9 +63,9 @@ describe('component-native-grid-view', () => { endPoint: { x: 100, y: 100 }, duration: 100 }) - await page.waitFor(600) + await page.waitFor(1200) const endDetail = await page.data('scrollEndDetailTest') - // console.log('scrollEndDetailTest:', endDetail) + console.log('scrollEndDetailTest:', endDetail) expect(endDetail.deltaY).toBe(0) expect(endDetail.deltaX).toBe(0) expect(endDetail.scrollLeft).toBe(0) @@ -81,7 +81,7 @@ describe('component-native-grid-view', () => { expect(value).toBe(true) }) - // //检测下拉刷新 备注:iOS本地测试结果正确,但是自动化测试结果错误 + //检测下拉刷新 备注:iOS本地测试结果正确,但是自动化测试结果错误 it('check_refresher', async () => { await page.callMethod('confirm_scroll_top_input', 0) await page.setData({ diff --git a/pages/component/list-view/list-view.test.js b/pages/component/list-view/list-view.test.js index 047b9fea..42f29be5 100644 --- a/pages/component/list-view/list-view.test.js +++ b/pages/component/list-view/list-view.test.js @@ -90,9 +90,9 @@ describe('component-native-list-view', () => { endPoint: { x: 100, y: 100 }, duration: 100 }) - await page.waitFor(600) + await page.waitFor(1600) const endDetail = await page.data('scrollEndDetailTest') - // console.log('scrollEndDetailTest:', endDetail) + console.log('scrollEndDetailTest:', endDetail) expect(endDetail.deltaY).toBe(0) expect(endDetail.deltaX).toBe(0) expect(endDetail.scrollLeft).toBe(0) -- GitLab