提交 a5b06f8a 编写于 作者: J James924666

test: 优化截图测试平台判断逻辑

上级 3dfb0a03
...@@ -237,13 +237,13 @@ const PAGE_PATH = ...@@ -237,13 +237,13 @@ const PAGE_PATH =
describe("shot-compare", () => { describe("shot-compare", () => {
let shouldCompareScreenShot = false let shouldCompareScreenShot = false
if (process.env.uniTestPlatformInfo.startsWith('android') && !process.env.UNI_AUTOMATOR_APP_WEBVIEW) { const uniTestPlatformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
let version = process.env.uniTestPlatformInfo if (uniTestPlatformInfo.startsWith('android') && !process.env.UNI_AUTOMATOR_APP_WEBVIEW) {
version = parseInt(version.split(" ")[1]) version = parseInt(uniTestPlatformInfo.split(" ")[1])
shouldCompareScreenShot = version > 9 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 shouldCompareScreenShot = true
} }
......
...@@ -235,13 +235,13 @@ const PAGE_PATH = ...@@ -235,13 +235,13 @@ const PAGE_PATH =
describe("shot-compare", () => { describe("shot-compare", () => {
let shouldCompareScreenShot = false let shouldCompareScreenShot = false
if (process.env.uniTestPlatformInfo.startsWith('android') && !process.env.UNI_AUTOMATOR_APP_WEBVIEW) { const uniTestPlatformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
let version = process.env.uniTestPlatformInfo if (uniTestPlatformInfo.startsWith('android') && !process.env.UNI_AUTOMATOR_APP_WEBVIEW) {
version = parseInt(version.split(" ")[1]) version = parseInt(uniTestPlatformInfo.split(" ")[1])
shouldCompareScreenShot = version > 9 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 shouldCompareScreenShot = true
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册