diff --git a/src/test/java/org/jitsi/meet/test/StartMutedTest.java b/src/test/java/org/jitsi/meet/test/StartMutedTest.java index 9813d9c1f..4ab06c961 100644 --- a/src/test/java/org/jitsi/meet/test/StartMutedTest.java +++ b/src/test/java/org/jitsi/meet/test/StartMutedTest.java @@ -22,8 +22,6 @@ import org.testng.annotations.*; -import static org.testng.Assert.*; - /** * Start muted tests * @author Hristo Terezov @@ -213,7 +211,7 @@ public void startWithVideoMutedCanUnmute() MeetUIUtils.unmuteVideoAndCheck(participant2, participant1); - participant1.getLargeVideo().isVideoPlaying(); + participant1.getLargeVideo().assertVideoPlaying(); } /** @@ -305,21 +303,22 @@ public void startWithAudioVideoMutedCanUnmute() // Unmute p1's both audio and video and check on p2. participant1.getToolbar().clickAudioUnmuteButton(); - MeetUIUtils.unmuteVideoAndCheck(participant1, participant2); - - participant2.getLargeVideo().isVideoPlaying(); - MeetUIUtils.waitForAudioMuted( participant2.getDriver(), participant1.getDriver(), "participant1", false); + MeetUIUtils.unmuteVideoAndCheck(participant1, participant2); + participant2.getLargeVideo().assertVideoPlaying(); + + TestUtils.waitMillis(1000); + // Unmute p2's audio and video and check on p1. MeetUIUtils.unmuteVideoAndCheck(participant2, participant1); - participant2.getToolbar().clickAudioUnmuteButton(); + participant1.getLargeVideo().assertVideoPlaying(); - participant1.getLargeVideo().isVideoPlaying(); + participant2.getToolbar().clickAudioUnmuteButton(); MeetUIUtils.waitForAudioMuted( participant1.getDriver(), participant2.getDriver(), @@ -359,6 +358,6 @@ public void testp2pJvbSwitchAndSwitchBack() // Check if p2's video is playing on p1. participant1.getParticipantsPane().assertIsParticipantVideoMuted(participant2, false); - participant1.getLargeVideo().isVideoPlaying(); + participant1.getLargeVideo().assertVideoPlaying(); } } diff --git a/src/test/java/org/jitsi/meet/test/pageobjects/web/LargeVideo.java b/src/test/java/org/jitsi/meet/test/pageobjects/web/LargeVideo.java index 5d3d00e68..cdb7a518c 100644 --- a/src/test/java/org/jitsi/meet/test/pageobjects/web/LargeVideo.java +++ b/src/test/java/org/jitsi/meet/test/pageobjects/web/LargeVideo.java @@ -43,13 +43,9 @@ public LargeVideo(WebParticipant participant) } /** - * Returns whether or not the video element on {@code LargeVideo} is - * currently playing. - * - * @return {@code boolean} True if the video element is progressing through - * video, false if no play progress is detected. + * Throws an exception if the video element is not playing (blocks for at least 500 ms). */ - public void isVideoPlaying() + public void assertVideoPlaying() { TestUtils.waitForCondition( participant.getDriver(), @@ -60,7 +56,6 @@ public void isVideoPlaying() TestUtils.waitMillis(500); double newTime = this.getVideoPlaytime(); - System.out.println(startTime + " " + newTime); return newTime > startTime; }); }