From 3ebdbaf0c7c86bf06b85b5f869f53f92dc6d8649 Mon Sep 17 00:00:00 2001 From: ismail Date: Wed, 24 Apr 2024 13:36:39 +0200 Subject: [PATCH] changes on hello world test --- .../openvidu-hello-world-test.spec.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Tests/TutorialTests/openvidu-hello-world-test.spec.js b/Tests/TutorialTests/openvidu-hello-world-test.spec.js index ad9ae82e..70b5dd60 100644 --- a/Tests/TutorialTests/openvidu-hello-world-test.spec.js +++ b/Tests/TutorialTests/openvidu-hello-world-test.spec.js @@ -39,6 +39,13 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a expect(isPaused).not.toBe(true); } + + // Check if audio is playing + var audioElement = await page1.$('audio'); + expect(audioElement).not.toBe(null); + + var isMuted = await audioElement.evaluate(audio => audio.muted); + expect(isMuted).not.toBe(true); // Capture a screenshot of page1 and save it to a file. @@ -67,15 +74,11 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a expect(isPaused).not.toBe(true); } + + audioElement = await page2.$('audio'); + expect(audioElement).not.toBe(null); - var isMuted = await videoElements[1].evaluate(video => video.muted); - - expect(isMuted).not.toBe(true); - - videoElements = await page1.$$('video'); - - isMuted = await videoElements[1].evaluate(video => video.muted); - + isMuted = await audioElement.evaluate(audio => audio.muted); expect(isMuted).not.toBe(true);