From 3e1adcd9b7900c6ed72b8554089d9edd011d1717 Mon Sep 17 00:00:00 2001 From: Hristo Terezov Date: Tue, 4 Feb 2025 08:36:54 -0600 Subject: [PATCH] feat(tests): Add start muted test. --- tests/helpers/Participant.ts | 194 +++++++++++------ tests/helpers/participants.ts | 32 +++ tests/pageobjects/Filmstrip.ts | 2 +- tests/pageobjects/LargeVideo.ts | 81 ++++++++ tests/pageobjects/SettingsDialog.ts | 24 +++ tests/specs/3way/activeSpeaker.spec.ts | 3 +- tests/specs/3way/avatars.spec.ts | 12 +- tests/specs/3way/followMe.spec.ts | 4 +- tests/specs/3way/startMuted.spec.ts | 265 ++++++++++++++++++++++++ tests/specs/4way/desktopSharing.spec.ts | 2 +- tests/specs/4way/lastN.spec.ts | 2 +- 11 files changed, 543 insertions(+), 78 deletions(-) create mode 100644 tests/pageobjects/LargeVideo.ts create mode 100644 tests/specs/3way/startMuted.spec.ts diff --git a/tests/helpers/Participant.ts b/tests/helpers/Participant.ts index 9e18ea2438..223403de1a 100644 --- a/tests/helpers/Participant.ts +++ b/tests/helpers/Participant.ts @@ -1,6 +1,7 @@ /* global APP $ */ import { multiremotebrowser } from '@wdio/globals'; +import assert from 'assert'; import { Key } from 'webdriverio'; import { IConfig } from '../../react/features/base/config/configType'; @@ -10,6 +11,7 @@ import ChatPanel from '../pageobjects/ChatPanel'; import Filmstrip from '../pageobjects/Filmstrip'; import IframeAPI from '../pageobjects/IframeAPI'; import InviteDialog from '../pageobjects/InviteDialog'; +import LargeVideo from '../pageobjects/LargeVideo'; import LobbyScreen from '../pageobjects/LobbyScreen'; import Notifications from '../pageobjects/Notifications'; import ParticipantsPane from '../pageobjects/ParticipantsPane'; @@ -27,6 +29,13 @@ export const P2_DISPLAY_NAME = 'p2'; export const P3_DISPLAY_NAME = 'p3'; export const P4_DISPLAY_NAME = 'p4'; +interface IWaitForSendReceiveDataOptions { + checkReceive?: boolean; + checkSend?: boolean; + msg?: string; + timeout?: number; +} + /** * Participant. */ @@ -91,7 +100,7 @@ export class Participant { async getEndpointId(): Promise { if (!this._endpointId) { this._endpointId = await this.driver.execute(() => { // eslint-disable-line arrow-body-style - return APP.conference.getMyUserId(); + return APP?.conference?.getMyUserId(); }); } @@ -209,7 +218,7 @@ export class Participant { const parallel = []; parallel.push(driver.execute((name, sessionId, prefix) => { - APP.UI.dockToolbar(true); + APP?.UI?.dockToolbar(true); // disable keyframe animations (.fadeIn and .fadeOut classes) $('