提交 293125c8 编写于 作者: 张磊

调整获取视频信息自动化示例。

上级 95de0b4e
...@@ -33,16 +33,15 @@ describe('API-getVideoInfo', () => { ...@@ -33,16 +33,15 @@ describe('API-getVideoInfo', () => {
const infos = process.env.uniTestPlatformInfo.split(' '); const infos = process.env.uniTestPlatformInfo.split(' ');
const version = parseInt(infos[infos.length - 1]); const version = parseInt(infos[infos.length - 1]);
if (process.env.uniTestPlatformInfo.startsWith('android') && version > 5) { if (process.env.uniTestPlatformInfo.startsWith('android') && version > 5) {
expect(await page.data('videoInfoForTest')).toEqual({ var videoInfo = await page.data('videoInfoForTest')
orientation: 'up', expect(videoInfo.orientation).toEqual("up")
type: 'video/mp4', expect(videoInfo.type).toEqual("video/mp4")
duration: 10, expect(videoInfo.duration).toEqual(10)
size: 183, expect(videoInfo.size).toEqual(183)
width: 1280, expect(videoInfo.width).toEqual(1280)
height: 720, expect(videoInfo.height).toEqual(720)
fps: 31, expect(videoInfo.fps == 30 || videoInfo.fps == 31).toEqual(true)
bitrate: 149 expect(videoInfo.bitrate).toEqual(149)
});
} }
}); });
}); });
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册