diff --git a/tests/helpers/participants.ts b/tests/helpers/participants.ts index cd5641de8b2f..8616e03f89e7 100644 --- a/tests/helpers/participants.ts +++ b/tests/helpers/participants.ts @@ -253,6 +253,7 @@ export async function muteAudioAndCheck(testee: Participant, observer: Participa * @param observer */ export async function unmuteAudioAndCheck(testee: Participant, observer: Participant) { + await testee.getNotifications().closeAskToUnmuteNotification(); await testee.getToolbar().clickAudioUnmuteButton(); await testee.getFilmstrip().assertAudioMuteIconIsDisplayed(testee, true); await observer.getFilmstrip().assertAudioMuteIconIsDisplayed(testee, true); diff --git a/tests/pageobjects/Notifications.ts b/tests/pageobjects/Notifications.ts index 7e88e424bb53..47f079dcb90b 100644 --- a/tests/pageobjects/Notifications.ts +++ b/tests/pageobjects/Notifications.ts @@ -44,6 +44,13 @@ export default class Notifications extends BasePageObject { await displayNameEl.waitForDisplayed(); } + /** + * Closes the ask to unmute notification. + */ + async closeAskToUnmuteNotification() { + return this.closeLobbyNotification(ASK_TO_UNMUTE_NOTIFICATION_ID); + } + /** * Dismisses any join notifications. */ diff --git a/tests/pageobjects/ParticipantsPane.ts b/tests/pageobjects/ParticipantsPane.ts index 8af79c4dc607..c36b66233a96 100644 --- a/tests/pageobjects/ParticipantsPane.ts +++ b/tests/pageobjects/ParticipantsPane.ts @@ -107,10 +107,9 @@ export default class ParticipantsPane extends BasePageObject { } const participantId = await participantToUnmute.getEndpointId(); - const participantItem = this.participant.driver.$(`#participant-item-${participantId}`); - await participantItem.waitForExist(); - await participantItem.moveTo(); + await this.selectParticipant(participantToUnmute); + await this.openParticipantContextMenu(participantToUnmute); const unmuteButton = this.participant.driver .$(`button[data-testid="unmute-video-${participantId}"]`); diff --git a/tests/specs/3way/audioVideoModeration.spec.ts b/tests/specs/3way/audioVideoModeration.spec.ts index 192eef6bc570..5320fbfc30cf 100644 --- a/tests/specs/3way/audioVideoModeration.spec.ts +++ b/tests/specs/3way/audioVideoModeration.spec.ts @@ -244,6 +244,7 @@ async function unmuteByModerator( await moderatorParticipantsPane.allowVideo(participant); await moderatorParticipantsPane.askToUnmute(participant, false); await participant.getNotifications().waitForAskToUnmuteNotification(); + await participant.getNotifications().closeAskToUnmuteNotification(); await unmuteAudioAndCheck(participant, moderator); await unmuteVideoAndCheck(participant, moderator);