提交 867f8181 编写于 作者: DCloud-yinjiacheng's avatar DCloud-yinjiacheng 提交者: 雪洛

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

上级 a3bde4f0
......@@ -100,6 +100,9 @@ describe('component-native-video', () => {
});
it('test event fullscreenchange fullscreenclick controlstoggle', async () => {
if (process.env.uniTestPlatformInfo.startsWith('ios')) {
return;
}
await page.callMethod('requestFullScreen');
await page.waitFor(async () => {
return await page.data('eventFullscreenchange');
......
......@@ -38,7 +38,7 @@ describe('component-native-web-view', () => {
userAgent: `uni-app-x/${process.env.HX_Version.split('-')[0].split('.').slice(0, 2).join('.')}`,
contentDisposition: '',
mimetype: 'application/vnd.android.package-archive',
contentLength: 27317517
isContentLengthValid: true
});
return;
}
......@@ -52,7 +52,7 @@ describe('component-native-web-view', () => {
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
isContentLengthValid: true
});
} else { // 低版本webview内核,部分属性无有效值
expect(await page.data('eventDownload')).toEqual({
......@@ -62,7 +62,7 @@ describe('component-native-web-view', () => {
userAgent: '',
contentDisposition: '',
mimetype: '',
contentLength: -1
isContentLengthValid: false
});
}
});
......
......@@ -57,7 +57,7 @@
"userAgent": arr[arr.length - 1],
"contentDisposition": event.detail.contentDisposition,
"mimetype": event.detail.mimetype,
"contentLength": event.detail.contentLength.toInt()
"isContentLengthValid": (event.detail.contentLength / 1024 / 1024).toInt() > 1
};
}
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册