use of org.jitsi.meet.test.pageobjects.web.ParticipantsPane in project jitsi-meet-torture by jitsi.
the class BreakoutRoomsTest method testLeaveRoom.
@Test(dependsOnMethods = { "testJoinRoom" })
public void testLeaveRoom() {
ParticipantsPane pane = participant1.getParticipantsPane();
BreakoutRoomsList roomsList = participant1.getBreakoutRoomsList();
// leave room
pane.leaveBreakoutRoom();
// there should be one breakout room and that should not be the main room
TestUtils.waitForCondition(participant1.getDriver(), 5, (ExpectedCondition<Boolean>) d -> {
List<BreakoutRoomsList.BreakoutRoom> rooms = roomsList.getRooms();
return rooms.size() == 1 && !(rooms.get(0).getName().trim().equals(MAIN_ROOM_NAME));
});
// the second participant should see no participants in the breakout room
TestUtils.waitForCondition(participant2.getDriver(), 5, (ExpectedCondition<Boolean>) d -> {
List<BreakoutRoomsList.BreakoutRoom> rooms = participant2.getBreakoutRoomsList().getRooms();
return rooms.size() == 1 && rooms.get(0).getParticipantsCount() == 0;
});
}
use of org.jitsi.meet.test.pageobjects.web.ParticipantsPane in project jitsi-meet-torture by jitsi.
the class BreakoutRoomsTest method testAddBreakoutRoom.
@Test
public void testAddBreakoutRoom() {
ParticipantsPane pane = participant1.getParticipantsPane();
BreakoutRoomsList roomsList = participant1.getBreakoutRoomsList();
pane.open();
// there should be no breakout rooms initially
TestUtils.waitForCondition(participant1.getDriver(), 5, (ExpectedCondition<Boolean>) d -> roomsList.getRoomsCount() == 0);
// add one breakout room
pane.addBreakoutRoom();
// there should be one breakout room with no participants
TestUtils.waitForCondition(participant1.getDriver(), 5, (ExpectedCondition<Boolean>) d -> roomsList.getRoomsCount() == 1 && roomsList.getRooms().get(0).getParticipantsCount() == 0);
// second participant should also see one breakout room
participant2.getParticipantsPane().open();
TestUtils.waitForCondition(participant2.getDriver(), 5, (ExpectedCondition<Boolean>) d -> participant2.getBreakoutRoomsList().getRoomsCount() == 1);
}
use of org.jitsi.meet.test.pageobjects.web.ParticipantsPane 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.pageobjects.web.ParticipantsPane in project jitsi-meet-torture by jitsi.
the class BreakoutRoomsTest method testAutoAssign.
@Test(dependsOnMethods = { "testRemoveRoom" })
public void testAutoAssign() {
ensureThreeParticipants();
participant3 = getParticipant3();
ParticipantsPane pane = participant1.getParticipantsPane();
BreakoutRoomsList roomsList = participant1.getBreakoutRoomsList();
// create two rooms
pane.addBreakoutRoom();
pane.addBreakoutRoom();
// there should be two breakout rooms
TestUtils.waitForCondition(participant1.getDriver(), 5, (ExpectedCondition<Boolean>) d -> roomsList.getRoomsCount() == 2);
// auto assign participants to rooms
pane.autoAssignToBreakoutRooms();
// each room should have one participant
TestUtils.waitForCondition(participant1.getDriver(), 5, (ExpectedCondition<Boolean>) d -> {
List<BreakoutRoomsList.BreakoutRoom> rooms = roomsList.getRooms();
return rooms.get(0).getParticipantsCount() == 1 && rooms.get(1).getParticipantsCount() == 1;
});
// the second participant should see one participant in the main room
TestUtils.waitForCondition(participant2.getDriver(), 5, (ExpectedCondition<Boolean>) d -> {
BreakoutRoomsList.BreakoutRoom room = participant2.getBreakoutRoomsList().getRooms().get(0);
return room.getName().trim().equals(MAIN_ROOM_NAME) && room.getParticipantsCount() == 1;
});
}
Aggregations