diff --git a/pages/webview-screenshot-comparison/webview-screenshot-comparison.test.js b/pages/webview-screenshot-comparison/webview-screenshot-comparison.test.js index cb9f9af35e535d40e72ba18b15520e57808161f5..2c7a0970abcbb27825a07384f0b5bc00f60d7110 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 30c6f35e322dffff229b9446e40a7e703aca9a5e..ce00126ddd6e78ec9bfa75b137cb3db75882bba4 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 }