From 9bd9235217e146e113aaf222f4c90032adb28d7a Mon Sep 17 00:00:00 2001 From: zhenyuWang <13641039885@163.com> Date: Sat, 21 Sep 2024 11:11:58 +0800 Subject: [PATCH] =?UTF-8?q?test(swiper):=20=E8=A7=84=E9=81=BF=E6=9C=AA?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/swiper/swiper2.test.js | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/pages/component/swiper/swiper2.test.js b/pages/component/swiper/swiper2.test.js index a1a78047..229d8677 100644 --- a/pages/component/swiper/swiper2.test.js +++ b/pages/component/swiper/swiper2.test.js @@ -1,20 +1,22 @@ -const PAGE_PATH = '/pages/component/swiper/swiper' - -describe('swiper-touch-test', () => { +const PAGE_PATH = '/pages/component/swiper/swiper' - // 屏蔽 web 平台 - if (process.env.uniTestPlatformInfo.startsWith('web')) { +describe('swiper-touch-test', () => { +const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase() +const isAndroid = platformInfo.startsWith('android') +const isWeb = platformInfo.startsWith('web') + // 屏蔽 web * android 平台 + if (isWeb || isAndroid) { it('other platform', () => { expect(1).toBe(1) }) return } - - let page - beforeAll(async () => { - page = await program.reLaunch(PAGE_PATH) - await page.waitFor(1500); - }) + + let page + beforeAll(async () => { + page = await program.reLaunch(PAGE_PATH) + await page.waitFor(1500); + }) it('swiper-touch-test', async () => { @@ -33,5 +35,5 @@ describe('swiper-touch-test', () => { console.log(val) expect(val).toEqual(1) }) - + }) -- GitLab