From 8fb788c7e98e7841bed1213619383db2be1d5d5e Mon Sep 17 00:00:00 2001 From: zhenyuWang <13641039885@163.com> Date: Wed, 19 Jun 2024 14:34:41 +0800 Subject: [PATCH] =?UTF-8?q?test(general=20event):=20=E4=BF=AE=E5=A4=8D=20a?= =?UTF-8?q?ndroid=20x86=20=E6=B5=8B=E8=AF=95=E5=BC=82=E5=B8=B8=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/general-event/general-event.test.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pages/component/general-event/general-event.test.js b/pages/component/general-event/general-event.test.js index 41a82b26..13bbd087 100644 --- a/pages/component/general-event/general-event.test.js +++ b/pages/component/general-event/general-event.test.js @@ -2,9 +2,8 @@ const PAGE_PATH = '/pages/component/general-event/general-event' describe('event trigger', () => { const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase() - const osName = process.env.UNI_OS_NAME.toLocaleLowerCase() - const isAndroid = osName.startsWith('android') - const isIos = osName.startsWith('ios') + const isAndroid = platformInfo.startsWith('android') + const isIos = platformInfo.startsWith('ios') let page beforeAll(async () => { page = await program.navigateTo(PAGE_PATH) @@ -223,7 +222,7 @@ describe('event trigger', () => { if (isAndroid || isIos) { if (isAndroid) { - if (platformInfo.indexOf('6') != -1) { + if (platformInfo.indexOf('6') != -1 && platformInfo.indexOf('x86') == -1) { await program.tap({ x: 200, y: 700, @@ -249,8 +248,6 @@ describe('event trigger', () => { duration: 1000 }) } - const img = await program.screenshot({fullPage: true}); - expect(img).toSaveImageSnapshot() const longPressTouchIdentifierText = await longPressTouchIdentifier.text() expect(longPressTouchIdentifierText).not.toBe(longPressTouchTargetIdentifier) expect(longPressTouchIdentifierText).toBeTruthy() -- GitLab