mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
feat(tests): Adds oneOnOne test.
This commit is contained in:
@@ -80,10 +80,12 @@ export default class Filmstrip extends BasePageObject {
|
||||
* @param participant The participant.
|
||||
*/
|
||||
async pinParticipant(participant: Participant) {
|
||||
const id = participant === this.participant
|
||||
? 'localVideoContainer' : `participant_${await participant.getEndpointId()}`;
|
||||
if (participant === this.participant) {
|
||||
// when looking up the element and clicking it, it doesn't work if we do it twice in a row (oneOnOne.spec)
|
||||
return this.participant.execute(() => document?.getElementById('localVideoContainer')?.click());
|
||||
}
|
||||
|
||||
await this.participant.driver.$(`//span[@id="${id}"]`).click();
|
||||
return this.participant.driver.$(`//span[@id="participant_${await participant.getEndpointId()}"]`).click();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -155,12 +157,19 @@ export default class Filmstrip extends BasePageObject {
|
||||
return this.clickOnRemoteMenuLink(participantId, 'kicklink', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Hover over local video.
|
||||
*/
|
||||
hoverOverLocalVideo() {
|
||||
return this.participant.driver.$(LOCAL_VIDEO_MENU_TRIGGER).moveTo();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clicks on the hide self view button from local video.
|
||||
*/
|
||||
async hideSelfView() {
|
||||
// open local video menu
|
||||
await this.participant.driver.$(LOCAL_VIDEO_MENU_TRIGGER).moveTo();
|
||||
await this.hoverOverLocalVideo();
|
||||
await this.participant.driver.$(LOCAL_USER_CONTROLS).moveTo();
|
||||
|
||||
// click Hide self view button
|
||||
@@ -215,4 +224,16 @@ export default class Filmstrip extends BasePageObject {
|
||||
return (await this.participant.driver.$$('//div[@id="remoteVideos"]//span[contains(@class,"videocontainer")]')
|
||||
.filter(thumbnail => thumbnail.isDisplayed())).length;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if remote videos in filmstrip are visible.
|
||||
*
|
||||
* @param isDisplayed whether or not filmstrip remote videos should be visible
|
||||
*/
|
||||
verifyRemoteVideosDisplay(isDisplayed: boolean) {
|
||||
return this.participant.driver.$('//div[contains(@class, "remote-videos")]/div').waitForDisplayed({
|
||||
timeout: 5_000,
|
||||
reverse: !isDisplayed,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user