Skip to content

Commit

Permalink
fix(tests): Adopts tests to the AV moderation UI changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
damencho committed Feb 20, 2025
1 parent 9454049 commit 9108b7e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions tests/helpers/participants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 7 additions & 0 deletions tests/pageobjects/Notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
5 changes: 2 additions & 3 deletions tests/pageobjects/ParticipantsPane.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}"]`);
Expand Down
1 change: 1 addition & 0 deletions tests/specs/3way/audioVideoModeration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9108b7e

Please sign in to comment.