mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 03:12:29 +00:00
fix(tests) Check for the endpointID of the large-video (#16601)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user