From ebca2fba87e427d139258366ece4550dbd82cea5 Mon Sep 17 00:00:00 2001 From: yinjiacheng Date: Mon, 19 Aug 2024 12:39:08 +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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pages/component/video/video.test.js b/pages/component/video/video.test.js index 45f09521..1c074541 100644 --- a/pages/component/video/video.test.js +++ b/pages/component/video/video.test.js @@ -1,3 +1,4 @@ +jest.setTimeout(60000); describe('component-native-video', () => { if(process.env.uniTestPlatformInfo.startsWith('web')){ // TODO: web 端暂不支持测试 @@ -138,12 +139,12 @@ describe('component-native-video', () => { }); const infos = process.env.uniTestPlatformInfo.split(' '); const version = parseInt(infos[infos.length - 1]); - if (process.env.uniTestPlatformInfo.startsWith('android') && process.env.android_cpu_type != 'x86' && process.env.android_cpu_type != 'x86_64' && version > 5) { // android5.1模拟器全屏时会弹出系统提示框,无法响应adb tap命令 + if (process.env.uniTestPlatformInfo.startsWith('android') && version > 5) { // android5.1模拟器全屏时会弹出系统提示框,无法响应adb tap命令 await page.waitFor(5000); await program.adbCommand('input tap 10 10'); start = Date.now(); await page.waitFor(async () => { - return (await page.data('eventFullscreenclick')) || (Date.now() - start > 500); + return (await page.data('eventFullscreenclick')) || (Date.now() - start > 1000); }); const res = await program.adbCommand('wm size'); const width = res.data.split(' ').at(-1).split('x')[0]; @@ -169,7 +170,7 @@ describe('component-native-video', () => { await page.callMethod('seek', 120); start = Date.now(); await page.waitFor(async () => { - return (await page.data('eventEnded')) || (Date.now() - start > 5000); + return (await page.data('eventEnded')) || (Date.now() - start > 30000); }); expect(await page.data('eventEnded')).toEqual({ tagName: 'VIDEO', -- GitLab