From c2dd1464b053fea3bbc08c360a06dfff23cd6de9 Mon Sep 17 00:00:00 2001 From: shutao Date: Fri, 1 Mar 2024 18:17:09 +0800 Subject: [PATCH] =?UTF-8?q?update=20list-view.test.js=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BE=8B=E6=97=A0=E6=B3=95=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/list-view/list-view.test.js | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pages/component/list-view/list-view.test.js b/pages/component/list-view/list-view.test.js index 1f36e693..3c2520ec 100644 --- a/pages/component/list-view/list-view.test.js +++ b/pages/component/list-view/list-view.test.js @@ -28,6 +28,11 @@ describe('component-native-list-view', () => { //检测横向scrollLeft属性赋值 it('check_scroll_left', async () => { + if(await page.data('scroll_x_boolean') === false) { + await page.callMethod('change_scroll_x_boolean', true) + await page.callMethod('change_scroll_y_boolean', false) + await page.waitFor(600) + } await page.callMethod('confirm_scroll_left_input', 600) await page.waitFor(600) const listElement = await page.$('#listview') @@ -42,6 +47,11 @@ describe('component-native-list-view', () => { //检测横向可滚动区域 it('check_scroll_width', async () => { + if(await page.data('scroll_x_boolean') === false) { + await page.callMethod('change_scroll_x_boolean', true) + await page.callMethod('change_scroll_y_boolean', false) + await page.waitFor(600) + } await page.callMethod('change_scroll_y_boolean', false) await page.callMethod('change_scroll_x_boolean', true) await page.waitFor(600) @@ -51,6 +61,11 @@ describe('component-native-list-view', () => { //检测下拉刷新 it('check_refresher', async () => { + if(await page.data('scroll_y_boolean') === false) { + await page.callMethod('change_scroll_y_boolean', true) + await page.callMethod('change_scroll_x_boolean', false) + await page.waitFor(600) + } await page.setData({ refresher_enabled_boolean: true, refresher_triggered_boolean: true @@ -61,6 +76,11 @@ describe('component-native-list-view', () => { //检测竖向scroll_into_view属性赋值 it('check_scroll_into_view_top', async () => { + if(await page.data('scroll_y_boolean') === false) { + await page.callMethod('change_scroll_y_boolean', true) + await page.callMethod('change_scroll_x_boolean', false) + await page.waitFor(600) + } await page.callMethod('item_change_size_enum', 3) await page.waitFor(600) const listElement = await page.$('#listview') @@ -72,6 +92,11 @@ describe('component-native-list-view', () => { //检测横向scroll_into_view属性赋值 it('check_scroll_into_view_left', async () => { + if(await page.data('scroll_x_boolean') === false) { + await page.callMethod('change_scroll_x_boolean', true) + await page.callMethod('change_scroll_y_boolean', false) + await page.waitFor(600) + } await page.callMethod('item_change_size_enum', 3) await page.waitFor(600) const listElement = await page.$('#listview') -- GitLab