From cfaa1b6c60e83824622e3e09cd3767a8042fa58f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=BA=9A=E7=90=AA?= Date: Tue, 23 Apr 2024 15:34:11 +0800 Subject: [PATCH] =?UTF-8?q?test:=20web=E7=AB=AFvideo=E4=BB=85=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8C=96=E6=B5=8B=E8=AF=95=E9=9D=99=E9=9F=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/video/video.test.js | 13 ++++++------- pages/component/video/video.uvue | 3 --- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/pages/component/video/video.test.js b/pages/component/video/video.test.js index cdd5fa67..c1e37ae2 100644 --- a/pages/component/video/video.test.js +++ b/pages/component/video/video.test.js @@ -1,14 +1,13 @@ describe('component-native-video', () => { - if(process.env.uniTestPlatformInfo.startsWith('web')){ - // TODO: web 端暂不支持测试 - it('web', async () => { - expect(1).toBe(1) - }) - return - } + let page; beforeAll(async () => { page = await program.reLaunch('/pages/component/video/video'); + if(process.env.uniTestPlatformInfo.startsWith('web')){ + await page.setData({ + muted: true + }); + } await page.waitFor(1000); }); diff --git a/pages/component/video/video.uvue b/pages/component/video/video.uvue index b539c570..fee0c513 100644 --- a/pages/component/video/video.uvue +++ b/pages/component/video/video.uvue @@ -230,9 +230,6 @@ } }, onLoad() { - // #ifdef WEB - this.muted = true // web端非静音视频不可自动播放 - // #endif }, methods: { // API -- GitLab