提交 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,15 +25,19 @@ describe('API-getVideoInfo', () => { ...@@ -25,15 +25,19 @@ describe('API-getVideoInfo', () => {
}); });
return; return;
} }
expect(await page.data('videoInfoForTest')).toEqual({ const infos = process.env.uniTestPlatformInfo.split(' ');
orientation: 'up', const version = parseInt(infos[infos.length - 1]);
type: 'video/mp4', if (process.env.uniTestPlatformInfo.startsWith('android') && version > 5) {
duration: 10, expect(await page.data('videoInfoForTest')).toEqual({
size: 211, orientation: 'up',
width: 1280, type: 'video/mp4',
height: 720, duration: 10,
fps: 30, size: 211,
bitrate: 172 width: 1280,
}); height: 720,
fps: 30,
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.
先完成此消息的编辑!
想要评论请 注册