Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat(tests): Checks for mute icon in filmstrip and participants pane.
damenchod542b05bc4d3
diff --git a/react/features/participants-pane/constants.tsx b/react/features/participants-pane/constants.tsxindex a07355cffb..9f193ed98c 100644--- a/react/features/participants-pane/constants.tsx+++ b/react/features/participants-pane/constants.tsx@@ -68,11 +68,13 @@ export const AudioStateIcons = {[MEDIA_STATE.FORCE_MUTED]: (<Iconcolor = '#E04757'+ id = 'audioMuted'size = { 16 }src = { IconMicSlash } />),[MEDIA_STATE.MUTED]: (<Icon+ id = 'audioMuted'size = { 16 }src = { IconMicSlash } />),diff --git a/tests/helpers/participants.ts b/tests/helpers/participants.tsindex 8ef373774e..30f1910bd5 100644--- a/tests/helpers/participants.ts+++ b/tests/helpers/participants.ts@@ -273,6 +273,10 @@ export async function muteAudioAndCheck(testee: Participant, observer: Participaawait observer.getFilmstrip().assertAudioMuteIconIsDisplayed(testee);await testee.getFilmstrip().assertAudioMuteIconIsDisplayed(testee);++ await observer.getParticipantsPane().assertAudioMuteIconIsDisplayed(testee);+ await testee.getParticipantsPane().assertAudioMuteIconIsDisplayed(testee);+}/**@@ -285,8 +289,12 @@ export async function unmuteAudioAndCheck(testee: Participant, observer: Particiawait testee.getNotifications().closeAskToUnmuteNotification(true);await testee.getNotifications().closeAVModerationMutedNotification(true);await testee.getToolbar().clickAudioUnmuteButton();+await testee.getFilmstrip().assertAudioMuteIconIsDisplayed(testee, true);await observer.getFilmstrip().assertAudioMuteIconIsDisplayed(testee, true);++ await testee.getParticipantsPane().assertAudioMuteIconIsDisplayed(testee, true);+ await observer.getParticipantsPane().assertAudioMuteIconIsDisplayed(testee, true);}/**diff --git a/tests/pageobjects/ParticipantsPane.ts b/tests/pageobjects/ParticipantsPane.tsindex a2df211e6c..e8d6ecfbaf 100644--- a/tests/pageobjects/ParticipantsPane.ts+++ b/tests/pageobjects/ParticipantsPane.ts@@ -75,7 +75,8 @@ export default class ParticipantsPane extends BasePageObject {await this.participant.driver.$(mutedIconXPath).waitForDisplayed({reverse,timeout: 2000,- timeoutMsg: `Video mute icon is${reverse ? '' : ' not'} displayed for ${testee.name}`+ timeoutMsg: `Video mute icon is${reverse ? '' : ' not'} displayed for ${testee.displayName} at ${+ this.participant.displayName} side.`});if (!isOpen) {@@ -83,6 +84,39 @@ export default class ParticipantsPane extends BasePageObject {}}+ /**+ * Asserts that {@code participant} shows or doesn't show the video mute icon for the conference participant+ * identified by {@code testee}.+ *+ * @param {Participant} testee - The {@code Participant} for whom we're checking the status of audio muted icon.+ * @param {boolean} reverse - If {@code true}, the method will assert the absence of the "mute" icon;+ * otherwise, it will assert its presence.+ * @returns {Promise<void>}+ */+ async assertAudioMuteIconIsDisplayed(testee: Participant, reverse = false): Promise<void> {+ const isOpen = await this.isOpen();++ if (!isOpen) {+ await this.open();+ }++ const id = `participant-item-${await testee.getEndpointId()}`;+ const mutedIconXPath+ = `//div[@id='${id}']//div[contains(@class, 'indicators')]//*[local-name()='svg' and @id='audioMuted']`;++ await this.participant.driver.$(mutedIconXPath).waitForDisplayed({+ reverse,+ timeout: 2000,+ timeoutMsg: `Audio mute icon is${reverse ? '' : ' not'} displayed for ${testee.displayName} at ${+ this.participant.displayName} side.`+ });++ if (!isOpen) {+ await this.close();+ }+ }++/*** Clicks the context menu button in the participants pane.*/