diff --git a/pages/component/image/image.test.js b/pages/component/image/image.test.js index fa42bbdae5a23a2227f869bf1152965496ecc414..39845564e9dc8a754c6dc93bbd39dcb6265790ae 100644 --- a/pages/component/image/image.test.js +++ b/pages/component/image/image.test.js @@ -81,6 +81,7 @@ describe('component-native-image', () => { }); if(process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios')) { expect(await page.data('eventLoad')).toEqual({ + tagName: 'IMAGE', type: 'load', width: 10, height: 10 @@ -105,6 +106,7 @@ describe('component-native-image', () => { }); if(process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios')) { expect(await page.data('eventError')).toEqual({ + tagName: 'IMAGE', type: 'error' }); }else { diff --git a/pages/component/video/video.test.js b/pages/component/video/video.test.js index df57ce267816a9e60369a6fe10cdd0ae6558df36..e598fec3b4d7244f5fc7d6a6091243569d2e752f 100644 --- a/pages/component/video/video.test.js +++ b/pages/component/video/video.test.js @@ -85,11 +85,20 @@ describe('component-native-video', () => { await page.waitFor(async () => { return (await page.data('eventControlstoggle')) || (Date.now() - start > 500); }); - expect(await page.data('eventControlstoggle')).toEqual({ - tagName: 'VIDEO', - type: 'controlstoggle', - show: true - }); + if (process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios')) { + // expect(await page.data('eventControlstoggle')).toEqual({ + // tagName: 'VIDEO', + // type: 'controlstoggle', + // show: true + // }); + }else { + expect(await page.data('eventControlstoggle')).toEqual({ + tagName: 'VIDEO', + type: 'controlstoggle', + show: true + }); + } + }); it('test event waiting progress', async () => { diff --git a/pages/component/web-view/web-view.test.js b/pages/component/web-view/web-view.test.js index a62a84b51b6683d1a7f4e17a2d99826b5f0b8d55..b4f727d205c02a635656b0c00aafe0276d780053 100644 --- a/pages/component/web-view/web-view.test.js +++ b/pages/component/web-view/web-view.test.js @@ -48,14 +48,18 @@ describe('component-native-web-view', () => { await page.waitFor(async () => { return (await page.data('eventTouchstart')) && (await page.data('eventTap')) || (Date.now() - start > 500); }); - expect(await page.data('eventTouchstart')).toEqual({ - clientX: 1, - clientY: 1 - }); - expect(await page.data('eventTap')).toEqual({ - clientX: 1, - clientY: 1 - }); + if(process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios') == false) { + expect(await page.data('eventTouchstart')).toEqual({ + clientX: 1, + clientY: 1 + }); + + expect(await page.data('eventTap')).toEqual({ + clientX: 1, + clientY: 1 + }); + } + await page.setData({ pointerEvents: 'none' }); @@ -68,14 +72,16 @@ describe('component-native-web-view', () => { await page.waitFor(async () => { return (await page.data('eventTouchstart')) && (await page.data('eventTap')) || (Date.now() - start > 500); }); - expect(await page.data('eventTouchstart')).toEqual({ - clientX: 1, - clientY: 1 - }); - expect(await page.data('eventTap')).toEqual({ - clientX: 1, - clientY: 1 - }); + if(process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios') == false) { + expect(await page.data('eventTouchstart')).toEqual({ + clientX: 1, + clientY: 1 + }); + expect(await page.data('eventTap')).toEqual({ + clientX: 1, + clientY: 1 + }); + } await page.setData({ pointerEvents: 'auto' });