From e2451010e58c9669a6359f551c50c221d9eea399 Mon Sep 17 00:00:00 2001 From: zhenyuWang <13641039885@163.com> Date: Tue, 23 Jan 2024 18:05:23 +0800 Subject: [PATCH] =?UTF-8?q?test(scroll-view-refresher):=20=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E6=B5=8B=E8=AF=95=E5=B9=B3=E5=8F=B0=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scroll-view/scroll-view-refresher.test.js | 41 +++++++++++-------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/pages/component/scroll-view/scroll-view-refresher.test.js b/pages/component/scroll-view/scroll-view-refresher.test.js index cc050d66..27e8473e 100644 --- a/pages/component/scroll-view/scroll-view-refresher.test.js +++ b/pages/component/scroll-view/scroll-view-refresher.test.js @@ -1,19 +1,24 @@ -// uni-app自动化测试教程: uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/ - -describe('test title', () => { - - let page; - beforeAll(async () => { - page = await program.reLaunch('/pages/component/scroll-view/scroll-view-refresher'); - await page.waitFor(300); - }); - - - it('check_refresher', async () => { - await page.setData({ - refresherTriggered: true - }) - await page.waitFor(2000); - expect(await page.data('refresherrefresh')).toBe(true) - }); +// uni-app自动化测试教程: uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/ + +describe('test title', () => { + if (process.env.uniTestPlatformInfo.startsWith('android')) { + let page; + beforeAll(async () => { + page = await program.reLaunch('/pages/component/scroll-view/scroll-view-refresher'); + await page.waitFor(300); + }); + + + it('check_refresher', async () => { + await page.setData({ + refresherTriggered: true + }) + await page.waitFor(2000); + expect(await page.data('refresherrefresh')).toBe(true) + }); + } else { + it('other platform', () => { + expect(1).toBe(1) + }) + } }); -- GitLab