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

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

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