mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 03:12:29 +00:00
fix(tests): Add missing helper function.
This commit is contained in:
committed by
Jaya Allamsetty
parent
81a7301a3e
commit
5453b615f5
@@ -927,6 +927,26 @@ export class Participant {
|
||||
return await this.isRemoteVideoReceived(endpointId) && await this.isRemoteVideoDisplayed(endpointId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Waits for a specific participant to be displayed on large video.
|
||||
*
|
||||
* @param {string} expectedEndpointId - The endpoint ID of the participant expected on large video.
|
||||
* @param {string} timeoutMsg - Optional custom timeout message.
|
||||
* @param {number} timeout - Optional timeout in milliseconds (default: 30000).
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async waitForParticipantOnLargeVideo(
|
||||
expectedEndpointId: string,
|
||||
timeoutMsg?: string,
|
||||
timeout: number = 30_000): Promise<void> {
|
||||
await this.driver.waitUntil(
|
||||
async () => await this.getLargeVideo().getResource() === expectedEndpointId,
|
||||
{
|
||||
timeout,
|
||||
timeoutMsg: timeoutMsg || `Expected ${expectedEndpointId} on large video for ${this.name}`
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Waits for remote video state - receiving and displayed.
|
||||
* @param endpointId
|
||||
|
||||
@@ -63,11 +63,12 @@ describe('Desktop sharing', () => {
|
||||
}
|
||||
});
|
||||
const { p1, p2, p3 } = ctx;
|
||||
const p2EndpointId = await p2.getEndpointId();
|
||||
|
||||
// Check if a remote screen share tile is created on all participants.
|
||||
await checkForScreensharingTile(p2, p1);
|
||||
await checkForScreensharingTile(p2, p2);
|
||||
await checkForScreensharingTile(p2, p2);
|
||||
await checkForScreensharingTile(p2, p3);
|
||||
|
||||
await p1.getFilmstrip().assertNoGapsInFilmstrip();
|
||||
await p3.getFilmstrip().assertNoGapsInFilmstrip();
|
||||
|
||||
Reference in New Issue
Block a user