Example #1
0
  /**
   * Closes the participant and leaves the owner alone in the room. Mutes the owner and then joins
   * new participant and checks the status of the mute icon. At the end unmutes to clear the state.
   */
  public void muteOwnerBeforeSecondParticipantJoins() {
    System.err.println("Start muteOwnerBeforeSecondParticipantJoins.");

    WebDriver owner = ConferenceFixture.getOwner();
    ConferenceFixture.close(ConferenceFixture.getSecondParticipant());

    // just in case wait
    TestUtils.waitMillis(1000);

    MeetUIUtils.clickOnToolbarButton(owner, "toolbar_button_mute");

    WebDriver secondParticipant = ConferenceFixture.startSecondParticipant();

    MeetUtils.waitForParticipantToJoinMUC(secondParticipant, 15);

    MeetUtils.waitForIceConnected(secondParticipant);

    MeetUIUtils.assertMuteIconIsDisplayed(
        secondParticipant,
        owner,
        true, // should be muted
        false, // audio
        "owner");

    // now lets unmute
    unMuteOwnerAndCheck();
  }
Example #2
0
  /**
   * Finds the menu that can be used by the owner to control the participant. Hovers over it. Finds
   * the mute link and mute it. Then checks in the second participant page whether it is muted
   */
  public void ownerMutesParticipantAndCheck() {
    System.err.println("Start ownerMutesParticipantAndCheck.");

    WebDriver owner = ConferenceFixture.getOwner();

    WebElement elem =
        owner.findElement(By.xpath("//div[@class='remotevideomenu']/i[@class='fa fa-angle-down']"));

    Actions action = new Actions(owner);
    action.moveToElement(elem);
    action.perform();

    TestUtils.waitForDisplayedElementByXPath(
        owner, "//ul[@class='popupmenu']/li/a[@class='mutelink']", 5);

    owner.findElement(By.xpath("//ul[@class='popupmenu']/li/a[@class='mutelink']")).click();

    // and now check whether second participant is muted
    TestUtils.waitForElementByXPath(
        ConferenceFixture.getSecondParticipant(),
        "//span[@class='audioMuted']/i[@class='icon-mic-disabled']",
        5);

    action.release();
  }
Example #3
0
 /** UnMutes the participant and checks at owner side. */
 public void unMuteParticipantAndCheck() {
   toggleMuteAndCheck(
       "unMuteParticipantAndCheck",
       ConferenceFixture.getSecondParticipant(),
       "participant2",
       ConferenceFixture.getOwner(),
       false);
 }
Example #4
0
 /** Mutes the participant and checks at owner side. */
 public void muteThirdParticipantAndCheck() {
   toggleMuteAndCheck(
       "muteThirdParticipantAndCheck",
       ConferenceFixture.getThirdParticipant(),
       "participant3",
       ConferenceFixture.getOwner(),
       true);
 }
Example #5
0
  /** Mutes the participant and checks at owner side. */
  public void muteThirdParticipantAndCheck() {
    MeetUIUtils.clickOnToolbarButton(ConferenceFixture.getThirdParticipant(), "mute");

    MeetUIUtils.verifyIsMutedStatus(
        "participant3",
        ConferenceFixture.getThirdParticipant(),
        ConferenceFixture.getOwner(),
        true);
  }
Example #6
0
  /** UnMutes the participant and checks at owner side. */
  public void unMuteParticipantAndCheck() {
    MeetUIUtils.clickOnToolbarButton(ConferenceFixture.getSecondParticipant(), "mute");

    MeetUIUtils.verifyIsMutedStatus(
        "participant2",
        ConferenceFixture.getSecondParticipant(),
        ConferenceFixture.getOwner(),
        false);
  }
Example #7
0
  /** Mutes the owner and checks at other participant is this is visible. */
  public void muteOwnerAndCheck() {
    toggleMuteAndCheck(
        "muteOwnerAndCheck",
        ConferenceFixture.getOwner(),
        "owner",
        ConferenceFixture.getSecondParticipant(),
        true);

    TestUtils.waitMillis(2000);
  }
Example #8
0
  /**
   * UnMutes once again the second participant and checks in the owner page does this change is
   * reflected.
   */
  public void participantUnMutesAfterOwnerMutedHimAndCheck() {
    MeetUIUtils.clickOnToolbarButton(ConferenceFixture.getSecondParticipant(), "mute");

    TestUtils.waitsForElementNotPresentByXPath(
        ConferenceFixture.getOwner(),
        "//span[@class='audioMuted']/i[@class='icon-mic-disabled']",
        5);

    // lets give time to the ui to reflect the change in the ui of the owner
    TestUtils.waits(1000);
  }
Example #9
0
  /**
   * UnMutes once again the second participant and checks in the owner page does this change is
   * reflected.
   */
  public void participantUnMutesAfterOwnerMutedHimAndCheck() {
    System.err.println("Start participantUnMutesAfterOwnerMutedHimAndCheck.");

    TestUtils.waitMillis(1000);

    MeetUIUtils.clickOnToolbarButton(
        ConferenceFixture.getSecondParticipant(), "toolbar_button_mute");

    TestUtils.waitMillis(1000);

    MeetUIUtils.assertMuteIconIsDisplayed(
        ConferenceFixture.getOwner(),
        ConferenceFixture.getSecondParticipant(),
        false, // should be unmuted
        false, // audio
        "participant2");

    // lets give time to the ui to reflect the change in the ui of the owner
    TestUtils.waitMillis(1000);
  }
Example #10
0
  /**
   * Closes the participant and leaves the owner alone in the room. Mutes the owner and then joins
   * new participant and checks the status of the mute icon. At the end unmutes to clear the state.
   */
  public void muteOwnerBeforeSecondParticipantJoins() {
    ConferenceFixture.quit(ConferenceFixture.getSecondParticipant());

    // just in case wait
    TestUtils.waits(1000);

    MeetUIUtils.clickOnToolbarButton(ConferenceFixture.getOwner(), "mute");

    ConferenceFixture.startParticipant();

    ConferenceFixture.checkParticipantToJoinRoom(ConferenceFixture.getSecondParticipant(), 10);

    ConferenceFixture.waitsParticipantToJoinConference(ConferenceFixture.getSecondParticipant());

    TestUtils.waitsForElementByXPath(
        ConferenceFixture.getSecondParticipant(),
        "//span[@class='audioMuted']/i[@class='icon-mic-disabled']",
        5);

    // now lets unmute
    unMuteOwnerAndCheck();
  }