From a5b06f8af1f44b372b988dc17532c5189304a094 Mon Sep 17 00:00:00 2001 From: James924666 Date: Fri, 29 Mar 2024 17:20:01 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E4=BC=98=E5=8C=96=E6=88=AA=E5=9B=BE?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=B9=B3=E5=8F=B0=E5=88=A4=E6=96=AD=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webview-screenshot-comparison.test.js | 8 ++++---- pages/webview-screenshot/webview-screenshot.test.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pages/webview-screenshot-comparison/webview-screenshot-comparison.test.js b/pages/webview-screenshot-comparison/webview-screenshot-comparison.test.js index cb9f9af3..2c7a0970 100644 --- a/pages/webview-screenshot-comparison/webview-screenshot-comparison.test.js +++ b/pages/webview-screenshot-comparison/webview-screenshot-comparison.test.js @@ -237,13 +237,13 @@ const PAGE_PATH = describe("shot-compare", () => { let shouldCompareScreenShot = false - if (process.env.uniTestPlatformInfo.startsWith('android') && !process.env.UNI_AUTOMATOR_APP_WEBVIEW) { - let version = process.env.uniTestPlatformInfo - version = parseInt(version.split(" ")[1]) + const uniTestPlatformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase() + if (uniTestPlatformInfo.startsWith('android') && !process.env.UNI_AUTOMATOR_APP_WEBVIEW) { + version = parseInt(uniTestPlatformInfo.split(" ")[1]) shouldCompareScreenShot = version > 9 } - if(process.env.uniTestPlatformInfo.startsWith('IOS') && !process.env.UNI_AUTOMATOR_APP_WEBVIEW) { + if(uniTestPlatformInfo.startsWith('ios') && !process.env.UNI_AUTOMATOR_APP_WEBVIEW) { shouldCompareScreenShot = true } diff --git a/pages/webview-screenshot/webview-screenshot.test.js b/pages/webview-screenshot/webview-screenshot.test.js index 30c6f35e..ce00126d 100644 --- a/pages/webview-screenshot/webview-screenshot.test.js +++ b/pages/webview-screenshot/webview-screenshot.test.js @@ -235,13 +235,13 @@ const PAGE_PATH = describe("shot-compare", () => { let shouldCompareScreenShot = false - if (process.env.uniTestPlatformInfo.startsWith('android') && !process.env.UNI_AUTOMATOR_APP_WEBVIEW) { - let version = process.env.uniTestPlatformInfo - version = parseInt(version.split(" ")[1]) + const uniTestPlatformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase() + if (uniTestPlatformInfo.startsWith('android') && !process.env.UNI_AUTOMATOR_APP_WEBVIEW) { + version = parseInt(uniTestPlatformInfo.split(" ")[1]) shouldCompareScreenShot = version > 9 } - if(process.env.uniTestPlatformInfo.startsWith('IOS') && !process.env.UNI_AUTOMATOR_APP_WEBVIEW) { + if(uniTestPlatformInfo.startsWith('ios') && !process.env.UNI_AUTOMATOR_APP_WEBVIEW) { shouldCompareScreenShot = true } -- GitLab