提交 a5b06f8a 编写于 作者: J James924666

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

上级 3dfb0a03
......@@ -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
}
......
......@@ -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
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册