提交 f5a033ad 编写于 作者: DCloud-yinjiacheng's avatar DCloud-yinjiacheng

更新media自动化测试用例

上级 ba199899
// uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/ // uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
describe('API-compressImage', () => { 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 () => { it('pass', async () => {
expect(1).toBe(1); expect(1).toBe(1);
}); });
......
// uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/ // uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
describe('API-compressVideo', () => { 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 () => { it('pass', async () => {
expect(1).toBe(1); expect(1).toBe(1);
}); });
......
// uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/ // uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
describe('API-getImageInfo', () => { describe('API-getImageInfo', () => {
if (process.env.uniTestPlatformInfo.startsWith('ios')) { if (process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios')) {
it('pass', async () => { it('pass', async () => {
expect(1).toBe(1); expect(1).toBe(1);
}); });
......
// uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/ // uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
describe('API-getVideoInfo', () => { describe('API-getVideoInfo', () => {
if (process.env.uniTestPlatformInfo.startsWith('ios')) { if (process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios')) {
it('pass', async () => { it('pass', async () => {
expect(1).toBe(1); expect(1).toBe(1);
}); });
...@@ -25,6 +25,9 @@ describe('API-getVideoInfo', () => { ...@@ -25,6 +25,9 @@ describe('API-getVideoInfo', () => {
}); });
return; return;
} }
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({ expect(await page.data('videoInfoForTest')).toEqual({
orientation: 'up', orientation: 'up',
type: 'video/mp4', type: 'video/mp4',
...@@ -35,5 +38,6 @@ describe('API-getVideoInfo', () => { ...@@ -35,5 +38,6 @@ describe('API-getVideoInfo', () => {
fps: 30, fps: 30,
bitrate: 172 bitrate: 172
}); });
}
}); });
}); });
// uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/ // uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
describe('API-saveImageToPhotosAlbum', () => { 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 () => { it('pass', async () => {
expect(1).toBe(1); expect(1).toBe(1);
}); });
......
// uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/ // uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
describe('API-saveVideoToPhotosAlbum', () => { 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 () => { it('pass', async () => {
expect(1).toBe(1); expect(1).toBe(1);
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册