From 24adee836f3a7446482d9b44e95102fa897e3ea9 Mon Sep 17 00:00:00 2001 From: yinjiacheng Date: Tue, 2 Jul 2024 12:56:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0video=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/video/video.test.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pages/component/video/video.test.js b/pages/component/video/video.test.js index 7d95cef6..1b9eeeaa 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'); }); -- GitLab