diff --git a/pages/component/video/video.test.js b/pages/component/video/video.test.js index 395161144b487b33365d8f94c2927088bc550687..41e613d595b074ff342004ab3e7c2b7ffc625774 100644 --- a/pages/component/video/video.test.js +++ b/pages/component/video/video.test.js @@ -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'); diff --git a/pages/component/web-view-local/web-view-local.test.js b/pages/component/web-view-local/web-view-local.test.js index b11d372854a240c8e9bb777730f1fb8ad3a79d8f..0647e676cd04e70040a890b51c7970cddd8c6bdb 100644 --- a/pages/component/web-view-local/web-view-local.test.js +++ b/pages/component/web-view-local/web-view-local.test.js @@ -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 }); } }); diff --git a/pages/component/web-view-local/web-view-local.uvue b/pages/component/web-view-local/web-view-local.uvue index add414e6bbfa72a148d54d5e091161287280cd65..8dde31399d2b8baf79b38044d682a51eb8d876d6 100644 --- a/pages/component/web-view-local/web-view-local.uvue +++ b/pages/component/web-view-local/web-view-local.uvue @@ -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 }; } },