diff --git a/pages/component/video/video.test.js b/pages/component/video/video.test.js index 7d95cef640e458d478451938feaf94e15c21286a..1b9eeeaa2afcfacf57c51482c27adda7560250d1 100644 --- a/pages/component/video/video.test.js +++ b/pages/component/video/video.test.js @@ -125,14 +125,16 @@ describe('component-native-video', () => { const height = res.data.split(' ').at(-1).split('x')[1]; const res2 = await program.adbCommand('wm density'); const scale = res2.data.split(' ').at(-1) / 160; - expect(await page.data('eventFullscreenclick')).toEqual({ - tagName: 'VIDEO', - type: 'fullscreenclick', - screenX: parseInt(10 / scale), - screenY: parseInt(10 / scale), - screenWidth: parseInt(height / scale), - screenHeight: parseInt(width / scale) - }); + if (version > 5) { + expect(await page.data('eventFullscreenclick')).toEqual({ + tagName: 'VIDEO', + type: 'fullscreenclick', + screenX: parseInt(10 / scale), + screenY: parseInt(10 / scale), + screenWidth: parseInt(height / scale), + screenHeight: parseInt(width / scale) + }); + } } await page.callMethod('exitFullScreen'); });