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

更新web-view自动化测试用例

上级 36e1ba15
......@@ -19,7 +19,7 @@ describe('API-compressVideo', () => {
expect(await page.data('videoInfoForTest')).toEqual({
width: 640,
height: 360,
// isSizeReduce: true
isSizeReduce: true
});
});
});
......@@ -132,7 +132,7 @@
this.videoInfoForTest = {
"width": __res.width,
"height": __res.height,
// "isSizeReduce": afterComoressSize < beforeCompressSize
"isSizeReduce": afterComoressSize < beforeCompressSize
};
}
});
......
......@@ -42,15 +42,29 @@ describe('component-native-web-view', () => {
});
return;
}
expect(await page.data('eventDownload')).toEqual({
tagName: 'WEB-VIEW',
type: 'download',
url: 'https://web-ext-storage.dcloud.net.cn/uni-app-x/pkg/hello-uniappx.apk',
userAgent: `uni-app-x/${process.env.HX_Version.split('-')[0].split('.').slice(0, 2).join('.')}`,
contentDisposition: `attachment; filename="hello-uniappx.apk"; filename*=utf-8''hello-uniappx.apk`,
mimetype: 'application/vnd.android.package-archive',
contentLength: 27317517
});
const infos = process.env.uniTestPlatformInfo.split(' ');
const version = parseInt(infos[infos.length - 1]);
if (version > 8) {
expect(await page.data('eventDownload')).toEqual({
tagName: 'WEB-VIEW',
type: 'download',
url: 'https://web-ext-storage.dcloud.net.cn/uni-app-x/pkg/hello-uniappx.apk',
userAgent: `uni-app-x/${process.env.HX_Version.split('-')[0].split('.').slice(0, 2).join('.')}`,
contentDisposition: `attachment; filename="hello-uniappx.apk"; filename*=utf-8''hello-uniappx.apk`,
mimetype: 'application/vnd.android.package-archive',
contentLength: 27317517
});
} else { // 低版本webview内核,部分属性无有效值
expect(await page.data('eventDownload')).toEqual({
tagName: 'WEB-VIEW',
type: 'download',
url: 'https://web-ext-storage.dcloud.net.cn/uni-app-x/pkg/hello-uniappx.apk',
userAgent: '',
contentDisposition: '',
mimetype: '',
contentLength: -1
});
}
});
it('test event message', async () => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册