Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(tests): Moves muteAudio to ParticipantsPane.

damenchoe275f2005510
diff --git a/tests/pageobjects/ParticipantsPane.ts b/tests/pageobjects/ParticipantsPane.ts
index 038748ae5d..8af79c4dc6 100644
--- a/tests/pageobjects/ParticipantsPane.ts
+++ b/tests/pageobjects/ParticipantsPane.ts
@@ -239,4 +239,16 @@ export default class ParticipantsPane extends BasePageObject {
await rejectButton.waitForExist();
await rejectButton.click();
}
+
+ /**
+ * Mutes the audio of a participant.
+ * @param participant
+ */
+ async muteAudio(participant: Participant) {
+ const participantId = await participant.getEndpointId();
+
+ await this.participant.driver.$(`#participant-item-${participantId}`).moveTo();
+
+ await this.participant.driver.$(`button[data-testid="mute-audio-${participantId}"]`).click();
+ }
}
diff --git a/tests/specs/3way/audioVideoModeration.spec.ts b/tests/specs/3way/audioVideoModeration.spec.ts
index de735c746b..e312ac9432 100644
--- a/tests/specs/3way/audioVideoModeration.spec.ts
+++ b/tests/specs/3way/audioVideoModeration.spec.ts
@@ -165,7 +165,7 @@ describe('AVModeration', () => {
await unmuteByModerator(p1, p2, true, false);
// p1 mute audio on p2 and check
- await p1.getFilmstrip().muteAudio(p2);
+ await p1.getParticipantsPane().muteAudio(p2);
await p1.getFilmstrip().assertAudioMuteIconIsDisplayed(p2);
await p2.getFilmstrip().assertAudioMuteIconIsDisplayed(p2);
@@ -205,7 +205,7 @@ describe('AVModeration', () => {
await unmuteByModerator(p1, p2, false, false);
// mute and check
- await p1.getFilmstrip().muteAudio(p2);
+ await p1.getParticipantsPane().muteAudio(p2);
await p1.getFilmstrip().assertAudioMuteIconIsDisplayed(p2);
await p2.getFilmstrip().assertAudioMuteIconIsDisplayed(p2);