diff --git a/pages/API/compress-image/compress-image.test.js b/pages/API/compress-image/compress-image.test.js index e647dd4cba50725cf8700e36314ce166fbc5f8e7..15477b1325c91d278b0351b8198e20135beffe45 100644 --- a/pages/API/compress-image/compress-image.test.js +++ b/pages/API/compress-image/compress-image.test.js @@ -1,6 +1,6 @@ // uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/ describe('API-compressImage', () => { - if (process.env.uniTestPlatformInfo.startsWith('web') || process.env.uniTestPlatformInfo.startsWith('ios')) { + if (process.env.uniTestPlatformInfo.startsWith('web') || process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios')) { it('pass', async () => { expect(1).toBe(1); }); diff --git a/pages/API/compress-video/compress-video.test.js b/pages/API/compress-video/compress-video.test.js index a80a04e4ece9ab81ecc9674d22a652f6cbbf77f1..9afa4633112a65cffe4ca42b0603c665673ee510 100644 --- a/pages/API/compress-video/compress-video.test.js +++ b/pages/API/compress-video/compress-video.test.js @@ -1,6 +1,6 @@ // uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/ describe('API-compressVideo', () => { - if (process.env.uniTestPlatformInfo.startsWith('web') || process.env.uniTestPlatformInfo.startsWith('ios')) { + if (process.env.uniTestPlatformInfo.startsWith('web') || process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios')) { it('pass', async () => { expect(1).toBe(1); }); diff --git a/pages/API/get-image-info/get-image-info.test.js b/pages/API/get-image-info/get-image-info.test.js index 387a68528db9e1c80a42b63754250e12f4c8c76c..13fc83d5a147492ec32ee83d69591b599ae272ee 100644 --- a/pages/API/get-image-info/get-image-info.test.js +++ b/pages/API/get-image-info/get-image-info.test.js @@ -1,6 +1,6 @@ // uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/ describe('API-getImageInfo', () => { - if (process.env.uniTestPlatformInfo.startsWith('ios')) { + if (process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios')) { it('pass', async () => { expect(1).toBe(1); }); diff --git a/pages/API/get-video-info/get-video-info.test.js b/pages/API/get-video-info/get-video-info.test.js index c9d4fc252081c23394e533e532dd74982246bbf6..c7c9fc551b5ce76e20d9696580f3939f386f325a 100644 --- a/pages/API/get-video-info/get-video-info.test.js +++ b/pages/API/get-video-info/get-video-info.test.js @@ -1,6 +1,6 @@ // uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/ describe('API-getVideoInfo', () => { - if (process.env.uniTestPlatformInfo.startsWith('ios')) { + if (process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios')) { it('pass', async () => { expect(1).toBe(1); }); @@ -25,15 +25,19 @@ describe('API-getVideoInfo', () => { }); return; } - expect(await page.data('videoInfoForTest')).toEqual({ - orientation: 'up', - type: 'video/mp4', - duration: 10, - size: 211, - width: 1280, - height: 720, - fps: 30, - bitrate: 172 - }); + const infos = process.env.uniTestPlatformInfo.split(' '); + const version = parseInt(infos[infos.length - 1]); + if (process.env.uniTestPlatformInfo.startsWith('android') && version > 5) { + expect(await page.data('videoInfoForTest')).toEqual({ + orientation: 'up', + type: 'video/mp4', + duration: 10, + size: 211, + width: 1280, + height: 720, + fps: 30, + bitrate: 172 + }); + } }); }); diff --git a/pages/API/save-image-to-photos-album/save-image-to-photos-album.test.js b/pages/API/save-image-to-photos-album/save-image-to-photos-album.test.js index 4cd0748b6176b795692356cf0fcd5f686327483c..46e34fcfe5e25eb8fe34bcc74085ca8e8e5311ab 100644 --- a/pages/API/save-image-to-photos-album/save-image-to-photos-album.test.js +++ b/pages/API/save-image-to-photos-album/save-image-to-photos-album.test.js @@ -1,6 +1,6 @@ // uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/ describe('API-saveImageToPhotosAlbum', () => { - if (process.env.uniTestPlatformInfo.startsWith('web') || process.env.uniTestPlatformInfo.startsWith('ios')) { + if (process.env.uniTestPlatformInfo.startsWith('web') || process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios')) { it('pass', async () => { expect(1).toBe(1); }); diff --git a/pages/API/save-video-to-photos-album/save-video-to-photos-album.test.js b/pages/API/save-video-to-photos-album/save-video-to-photos-album.test.js index a0be43e5d21dd8eab595a71b7811f1a877968690..69f46b204ed980c2bfaabf1718ff742b42022d60 100644 --- a/pages/API/save-video-to-photos-album/save-video-to-photos-album.test.js +++ b/pages/API/save-video-to-photos-album/save-video-to-photos-album.test.js @@ -1,6 +1,6 @@ // uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/ describe('API-saveVideoToPhotosAlbum', () => { - if (process.env.uniTestPlatformInfo.startsWith('web') || process.env.uniTestPlatformInfo.startsWith('ios')) { + if (process.env.uniTestPlatformInfo.startsWith('web') || process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios')) { it('pass', async () => { expect(1).toBe(1); });