use of org.jitsi.meet.test.base.JitsiMeetUrl in project jitsi-meet-torture by jitsi.
the class AudioOnlyTest method setupClass.
@Override
public void setupClass() {
super.setupClass();
JitsiMeetUrl url = getJitsiMeetUrl().appendConfig("config.filmstrip.disableStageFilmstrip=true");
ensureTwoParticipants(url, url, new WebParticipantOptions().setSkipDisplayNameSet(true), null);
}
use of org.jitsi.meet.test.base.JitsiMeetUrl in project jitsi-meet-torture by jitsi.
the class AvatarTest method avatarWhenVideoMuted.
/**
* Scenario tests few cases for the avatar to be displayed when user mutes
* his video.
*/
@Test(dependsOnMethods = { "changeAvatarAndCheck" })
public void avatarWhenVideoMuted() {
hangUpAllExceptParticipant1();
// Start participant1
WebDriver driver1 = getParticipant1().getDriver();
String participant1EndpointId = getParticipant1().getEndpointId();
// Mute participant1's video
MeetUIUtils.muteVideoAndCheck(getParticipant1(), null);
// Check if avatar on large video is the same as on local thumbnail
String participant1ThumbSrc = getLocalThumbnailSrc(driver1);
final String participant1LargeSrc = getLargeVideoSrc(driver1);
assertTrue(participant1LargeSrc.startsWith(participant1ThumbSrc), "invalid avatar on the large video: " + participant1LargeSrc + ", should start with: " + participant1ThumbSrc);
// Join participant2
ensureTwoParticipants(null, null, null, new WebParticipantOptions().setSkipDisplayNameSet(true));
WebDriver driver2 = getParticipant2().getDriver();
String participant2EndpointId = getParticipant2().getEndpointId();
// Verify that participant1 is muted from the perspective of
// participant2
getParticipant2().getParticipantsPane().assertIsParticipantVideoMuted(getParticipant1(), true);
// Pin participant1's thumbnail, as participant1 is started muted for
// participant2, there is no video element, so don't use
// SwitchVideoTests.clickOnRemoteVideoAndTest which will check for
// remote video switching on large
MeetUIUtils.clickOnRemoteVideo(driver2, participant1EndpointId);
// Check if participant1's avatar is on large video now
TestUtils.waitForCondition(driver2, 5, (ExpectedCondition<Boolean>) d -> {
String currentSrc = getLargeVideoSrc(d);
return currentSrc.equals(participant1LargeSrc);
});
// participant1 pins participant2's video
MeetUIUtils.clickOnRemoteVideo(driver1, participant2EndpointId);
// Check if avatar is displayed on participant1's local video thumbnail
MeetUIUtils.assertLocalThumbnailShowsAvatar(driver1);
// Unmute - now local avatar should be hidden and local video displayed
StopVideoTest stopVideoTest = new StopVideoTest(this);
stopVideoTest.startVideoOnParticipant1AndCheck();
getParticipant2().getParticipantsPane().assertIsParticipantVideoMuted(getParticipant1(), false);
MeetUIUtils.assertLocalThumbnailShowsVideo(driver1);
// Now both participant1 and participant2 have video muted
MeetUIUtils.muteVideoAndCheck(getParticipant1(), getParticipant2());
getParticipant2().getParticipantsPane().assertIsParticipantVideoMuted(getParticipant1(), true);
MeetUIUtils.muteVideoAndCheck(getParticipant2(), getParticipant1());
getParticipant1().getParticipantsPane().assertIsParticipantVideoMuted(getParticipant2(), true);
// we check whether avatar of participant2 is same on both sides
// and we check whether it had changed after reloading the page
assertEquals(getLocalThumbnailSrc(driver2), participant2AvatarSrc);
assertEquals(getThumbnailSrc(driver1, participant2EndpointId), participant2AvatarSrc);
// Start the third participant
JitsiMeetUrl url = getJitsiMeetUrl().appendConfig("config.filmstrip.disableStageFilmstrip=true");
ensureThreeParticipants(null, null, url);
// Temporary wait few seconds so the avatar to be downloaded from libravatar
// Seems there is some delay when requesting it
TestUtils.waitMillis(3000);
WebDriver driver3 = getParticipant3().getDriver();
String participant2Src = getLocalThumbnailSrc(driver2);
// Pin local video and verify avatars are displayed
MeetUIUtils.clickOnLocalVideo(driver3);
MeetUIUtils.assertAvatarDisplayed(driver3, participant1EndpointId);
MeetUIUtils.assertAvatarDisplayed(driver3, participant2EndpointId);
assertEquals(getThumbnailSrc(driver3, participant2EndpointId), participant2Src);
assertEquals(getThumbnailSrc(driver3, participant1EndpointId), participant1ThumbSrc);
// Click on participant1's video
MeetUIUtils.clickOnRemoteVideo(driver3, participant1EndpointId);
// His avatar should be on large video and
// display name instead of an avatar, local video displayed
MeetUIUtils.waitsForLargeVideoSwitch(driver3, participant1EndpointId);
MeetUIUtils.assertDisplayNameVisible(driver3, participant1EndpointId);
MeetUIUtils.assertAvatarDisplayed(driver3, participant2EndpointId);
MeetUIUtils.assertLocalThumbnailShowsVideo(driver3);
// Click on participant2's video
MeetUIUtils.clickOnRemoteVideo(driver3, participant2EndpointId);
MeetUIUtils.waitsForLargeVideoSwitch(driver3, participant2EndpointId);
MeetUIUtils.assertDisplayNameVisible(driver3, participant2EndpointId);
MeetUIUtils.assertAvatarDisplayed(driver3, participant1EndpointId);
MeetUIUtils.assertLocalThumbnailShowsVideo(driver3);
getParticipant3().hangUp();
TestUtils.waitMillis(1500);
// Unmute participant1's and participant2's videos
stopVideoTest.startVideoOnParticipant1AndCheck();
getParticipant2().getParticipantsPane().assertIsParticipantVideoMuted(getParticipant1(), false);
stopVideoTest.startVideoOnParticipantAndCheck();
getParticipant2().getParticipantsPane().assertIsParticipantVideoMuted(getParticipant1(), false);
}
use of org.jitsi.meet.test.base.JitsiMeetUrl in project jitsi-meet-torture by jitsi.
the class IFrameAPIFunctionsTest method testFunctionPinParticipant.
/**
* Functions testing:
* https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-iframe#pinparticipant
*
* Test pinning participant.
*/
@Test(dependsOnMethods = { "testFunctionGetVideoQuality" })
public void testFunctionPinParticipant() {
hangUpAllParticipants();
this.iFrameUrl = getIFrameUrl(null, null, "config.filmstrip.disableStageFilmstrip=true");
JitsiMeetUrl url = getJitsiMeetUrl().appendConfig("config.filmstrip.disableStageFilmstrip=true");
// the previous test left it in meeting content
ensureThreeParticipants(this.iFrameUrl, url, url);
WebParticipant participant1 = getParticipant1();
WebDriver driver1 = participant1.getDriver();
// selects local
MeetUIUtils.selectLocalVideo(driver1);
String endpoint2Id = getParticipant2().getEndpointId();
switchToIframeAPI(driver1);
TestUtils.executeScriptAndReturnString(driver1, "JSON.stringify(window.jitsiAPI.pinParticipant('" + endpoint2Id + "'));");
switchToMeetContent(this.iFrameUrl, driver1);
// we must not be in tile view
MeetUIUtils.waitForTileViewDisplay(participant1, false);
MeetUIUtils.waitForLargeVideoSwitchToEndpoint(driver1, endpoint2Id);
// unpin second, so we clear the state for next in line for testing
SwitchVideoTest.unpinRemoteVideoAndTest(participant1, endpoint2Id);
}
use of org.jitsi.meet.test.base.JitsiMeetUrl in project jitsi-meet-torture by jitsi.
the class BreakoutRoomsTest method testSendParticipantToRoom.
@Test(dependsOnMethods = { "testCloseRoom" })
public void testSendParticipantToRoom() {
hangUpAllParticipants();
// because the participants rejoin so fast, the meeting is not properly ended,
// so the previous breakout rooms would still be there.
// To avoid this issue we use a different meeting
JitsiMeetUrl url = getJitsiMeetUrl().setRoomName("random-room-name").appendConfig("config.startWithAudioMuted=true");
ensureTwoParticipants(url, url);
ParticipantsPane pane = participant1.getParticipantsPane();
pane.open();
BreakoutRoomsList roomsList = participant1.getBreakoutRoomsList();
// there should be no breakout rooms
TestUtils.waitForCondition(participant1.getDriver(), 5, (ExpectedCondition<Boolean>) d -> roomsList.getRoomsCount() == 0);
// add one breakout room
pane.addBreakoutRoom();
// there should be one empty room
TestUtils.waitForCondition(participant1.getDriver(), 5, (ExpectedCondition<Boolean>) d -> {
List<BreakoutRoomsList.BreakoutRoom> rooms = roomsList.getRooms();
return rooms.size() == 1 && rooms.get(0).getParticipantsCount() == 0;
});
// send the second participant to the first breakout room
pane.sendParticipantToBreakoutRoom(participant2, roomsList.getRooms().get(0).getName().trim());
// there should be one room with one participant
TestUtils.waitForCondition(participant1.getDriver(), 5, (ExpectedCondition<Boolean>) d -> {
List<BreakoutRoomsList.BreakoutRoom> rooms = roomsList.getRooms();
return rooms.size() == 1 && rooms.get(0).getParticipantsCount() == 1;
});
}
use of org.jitsi.meet.test.base.JitsiMeetUrl in project jitsi-meet-torture by jitsi.
the class FollowMeTest method setupClass.
@Override
public void setupClass() {
super.setupClass();
JitsiMeetUrl url = getJitsiMeetUrl().appendConfig("config.filmstrip.disableStageFilmstrip=true");
ensureTwoParticipants(url, url);
oneTimeSetUp();
}
Aggregations