From cb66bf808bb571af16d471b37e33b2894dc6a027 Mon Sep 17 00:00:00 2001 From: Anne_LXM Date: Thu, 20 Jun 2024 15:02:40 +0800 Subject: [PATCH] =?UTF-8?q?test(swiper):=20issues-2342=E5=B7=B2=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D/=E6=94=BE=E5=BC=80android=E7=AB=AF=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/swiper/swiper.test.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pages/component/swiper/swiper.test.js b/pages/component/swiper/swiper.test.js index 47e9b9c7..60bc8912 100644 --- a/pages/component/swiper/swiper.test.js +++ b/pages/component/swiper/swiper.test.js @@ -111,15 +111,12 @@ describe('test swiper', () => { it('Event animationfinish', async () => { await page.waitFor(1000) - // bug:在android端第一次触发@animationfinish 得到detail中的source为空,第二次触发时正常得到source: 'autoplay' - if(!process.env.UNI_UTS_PLATFORM.startsWith('app-android')){ - const animationfinishDetailInfo = await page.data('animationfinishDetailTest') - if(process.env.uniTestPlatformInfo.startsWith('web')){ - expect(animationfinishDetailInfo).toEqual(webDetailRes) - }else{ - expect(animationfinishDetailInfo).toEqual(appDetailRes) - } - expect(await page.data('isAnimationfinishTest')).toBe('animationfinish:Success') + const animationfinishDetailInfo = await page.data('animationfinishDetailTest') + if(process.env.uniTestPlatformInfo.startsWith('web')){ + expect(animationfinishDetailInfo).toEqual(webDetailRes) + }else{ + expect(animationfinishDetailInfo).toEqual(appDetailRes) } + expect(await page.data('isAnimationfinishTest')).toBe('animationfinish:Success') }); }); -- GitLab