Search in sources :

Example 1 with ParticipantsPane

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;
    });
}
Also used : SkipException(org.testng.SkipException) java.util.logging(java.util.logging) java.util(java.util) WebTestBase(org.jitsi.meet.test.web.WebTestBase) By(org.openqa.selenium.By) ExpectedCondition(org.openqa.selenium.support.ui.ExpectedCondition) BreakoutRoomsList(org.jitsi.meet.test.pageobjects.web.BreakoutRoomsList) Test(org.testng.annotations.Test) TestUtils(org.jitsi.meet.test.util.TestUtils) WebParticipant(org.jitsi.meet.test.web.WebParticipant) TimeoutException(org.openqa.selenium.TimeoutException) Assert(org.testng.Assert) ParticipantsPane(org.jitsi.meet.test.pageobjects.web.ParticipantsPane) PARTICIPANT_ITEM(org.jitsi.meet.test.pageobjects.web.ParticipantsPane.PARTICIPANT_ITEM) JitsiMeetUrl(org.jitsi.meet.test.base.JitsiMeetUrl) BreakoutRoomsList(org.jitsi.meet.test.pageobjects.web.BreakoutRoomsList) BreakoutRoomsList(org.jitsi.meet.test.pageobjects.web.BreakoutRoomsList) ParticipantsPane(org.jitsi.meet.test.pageobjects.web.ParticipantsPane) Test(org.testng.annotations.Test)

Example 2 with ParticipantsPane

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);
}
Also used : SkipException(org.testng.SkipException) java.util.logging(java.util.logging) java.util(java.util) WebTestBase(org.jitsi.meet.test.web.WebTestBase) By(org.openqa.selenium.By) ExpectedCondition(org.openqa.selenium.support.ui.ExpectedCondition) BreakoutRoomsList(org.jitsi.meet.test.pageobjects.web.BreakoutRoomsList) Test(org.testng.annotations.Test) TestUtils(org.jitsi.meet.test.util.TestUtils) WebParticipant(org.jitsi.meet.test.web.WebParticipant) TimeoutException(org.openqa.selenium.TimeoutException) Assert(org.testng.Assert) ParticipantsPane(org.jitsi.meet.test.pageobjects.web.ParticipantsPane) PARTICIPANT_ITEM(org.jitsi.meet.test.pageobjects.web.ParticipantsPane.PARTICIPANT_ITEM) JitsiMeetUrl(org.jitsi.meet.test.base.JitsiMeetUrl) BreakoutRoomsList(org.jitsi.meet.test.pageobjects.web.BreakoutRoomsList) ParticipantsPane(org.jitsi.meet.test.pageobjects.web.ParticipantsPane) Test(org.testng.annotations.Test)

Example 3 with ParticipantsPane

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;
    });
}
Also used : SkipException(org.testng.SkipException) java.util.logging(java.util.logging) java.util(java.util) WebTestBase(org.jitsi.meet.test.web.WebTestBase) By(org.openqa.selenium.By) ExpectedCondition(org.openqa.selenium.support.ui.ExpectedCondition) BreakoutRoomsList(org.jitsi.meet.test.pageobjects.web.BreakoutRoomsList) Test(org.testng.annotations.Test) TestUtils(org.jitsi.meet.test.util.TestUtils) WebParticipant(org.jitsi.meet.test.web.WebParticipant) TimeoutException(org.openqa.selenium.TimeoutException) Assert(org.testng.Assert) ParticipantsPane(org.jitsi.meet.test.pageobjects.web.ParticipantsPane) PARTICIPANT_ITEM(org.jitsi.meet.test.pageobjects.web.ParticipantsPane.PARTICIPANT_ITEM) JitsiMeetUrl(org.jitsi.meet.test.base.JitsiMeetUrl) BreakoutRoomsList(org.jitsi.meet.test.pageobjects.web.BreakoutRoomsList) JitsiMeetUrl(org.jitsi.meet.test.base.JitsiMeetUrl) BreakoutRoomsList(org.jitsi.meet.test.pageobjects.web.BreakoutRoomsList) ParticipantsPane(org.jitsi.meet.test.pageobjects.web.ParticipantsPane) Test(org.testng.annotations.Test)

Example 4 with ParticipantsPane

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;
    });
}
Also used : SkipException(org.testng.SkipException) java.util.logging(java.util.logging) java.util(java.util) WebTestBase(org.jitsi.meet.test.web.WebTestBase) By(org.openqa.selenium.By) ExpectedCondition(org.openqa.selenium.support.ui.ExpectedCondition) BreakoutRoomsList(org.jitsi.meet.test.pageobjects.web.BreakoutRoomsList) Test(org.testng.annotations.Test) TestUtils(org.jitsi.meet.test.util.TestUtils) WebParticipant(org.jitsi.meet.test.web.WebParticipant) TimeoutException(org.openqa.selenium.TimeoutException) Assert(org.testng.Assert) ParticipantsPane(org.jitsi.meet.test.pageobjects.web.ParticipantsPane) PARTICIPANT_ITEM(org.jitsi.meet.test.pageobjects.web.ParticipantsPane.PARTICIPANT_ITEM) JitsiMeetUrl(org.jitsi.meet.test.base.JitsiMeetUrl) BreakoutRoomsList(org.jitsi.meet.test.pageobjects.web.BreakoutRoomsList) BreakoutRoomsList(org.jitsi.meet.test.pageobjects.web.BreakoutRoomsList) ParticipantsPane(org.jitsi.meet.test.pageobjects.web.ParticipantsPane) Test(org.testng.annotations.Test)

Aggregations

java.util (java.util)4 java.util.logging (java.util.logging)4 JitsiMeetUrl (org.jitsi.meet.test.base.JitsiMeetUrl)4 BreakoutRoomsList (org.jitsi.meet.test.pageobjects.web.BreakoutRoomsList)4 ParticipantsPane (org.jitsi.meet.test.pageobjects.web.ParticipantsPane)4 PARTICIPANT_ITEM (org.jitsi.meet.test.pageobjects.web.ParticipantsPane.PARTICIPANT_ITEM)4 TestUtils (org.jitsi.meet.test.util.TestUtils)4 WebParticipant (org.jitsi.meet.test.web.WebParticipant)4 WebTestBase (org.jitsi.meet.test.web.WebTestBase)4 By (org.openqa.selenium.By)4 TimeoutException (org.openqa.selenium.TimeoutException)4 ExpectedCondition (org.openqa.selenium.support.ui.ExpectedCondition)4 Assert (org.testng.Assert)4 SkipException (org.testng.SkipException)4 Test (org.testng.annotations.Test)4