fix(tests) Check for the endpointID of the large-video (#16601)

This commit is contained in:
Jaya Allamsetty
2025-10-29 12:35:45 -04:00
committed by GitHub
parent 076d77a982
commit ad144e6fd3

View File

@@ -80,29 +80,17 @@ export default class Filmstrip extends BasePageObject {
* @param participant The participant.
*/
async pinParticipant(participant: Participant) {
let videoIdToSwitchTo;
if (participant === this.participant) {
videoIdToSwitchTo = await this.getLocalVideoId();
// when looking up the element and clicking it, it doesn't work if we do it twice in a row (oneOnOne.spec)
await this.participant.execute(() => document?.getElementById('localVideoContainer')?.click());
} else {
const epId = await participant.getEndpointId();
videoIdToSwitchTo = await this.getRemoteVideoId(epId);
await this.participant.driver.$(`//span[@id="participant_${epId}"]`).click();
}
const endpointID = await participant.getEndpointId();
await this.participant.driver.waitUntil(
async () => await this.participant.getLargeVideo().getId() === videoIdToSwitchTo,
{
timeout: 3_000,
timeoutMsg: `${this.participant.name} did not switch the large video to ${
participant.name}`
}
);
await this.participant.waitForParticipantOnLargeVideo(endpointID);
}
/**