use of org.jitsi.meet.test.web.WebParticipant in project jitsi-meet-torture by jitsi.
the class BreakoutRoomsTest method testCloseRoom.
@Test(dependsOnMethods = { "testAutoAssign" })
public void testCloseRoom() {
participant3.getParticipantsPane().open();
BreakoutRoomsList roomsList = participant1.getBreakoutRoomsList();
// there should be two non-empty breakout rooms
TestUtils.waitForCondition(participant1.getDriver(), 5, (ExpectedCondition<Boolean>) d -> {
List<BreakoutRoomsList.BreakoutRoom> rooms = roomsList.getRooms();
return rooms.size() == 2 && rooms.get(0).getParticipantsCount() == 1 && rooms.get(1).getParticipantsCount() == 1;
});
// close the first room
BreakoutRoomsList.BreakoutRoom room = roomsList.getRooms().get(0);
room.closeRoom();
// there should be two rooms and first one should be empty
TestUtils.waitForCondition(participant1.getDriver(), 5, (ExpectedCondition<Boolean>) d -> roomsList.getRoomsCount() == 2 && roomsList.getRooms().get(0).getParticipantsCount() == 0);
// there should be two participants in the main room, either p2 or p3 got moved to the main room
List<WebParticipant> participants = Arrays.asList(participant2, participant3);
participants.forEach(p -> {
TestUtils.waitForCondition(p.getDriver(), 5, (ExpectedCondition<Boolean>) d -> {
BreakoutRoomsList.BreakoutRoom pRoom = p.getBreakoutRoomsList().getRooms().get(0);
if (pRoom.getName().trim().equals(MAIN_ROOM_NAME)) {
return pRoom.getParticipantsCount() == 2;
}
return pRoom.getParticipantsCount() == 0;
}, 500);
});
}
Aggregations