snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
This commit is contained in:
63
tests/pageobjects/Visitors.ts
Normal file
63
tests/pageobjects/Visitors.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import BasePageObject from './BasePageObject';
|
||||
|
||||
/**
|
||||
* Page object for the visitors elements in moderator and visitor page.
|
||||
*/
|
||||
export default class Visitors extends BasePageObject {
|
||||
/**
|
||||
* Returns the visitors dialog element if any.
|
||||
*/
|
||||
hasVisitorsDialog() {
|
||||
return this.participant.driver.$('div=Joining meeting');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the visitors count shown in the conference info (subject) area.
|
||||
*/
|
||||
getVisitorsCount() {
|
||||
return this.participant.driver.$('#visitorsCountLabel').getText();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the visitors count shown in the Participants pane.
|
||||
*/
|
||||
async getVisitorsHeaderFromParticipantsPane() {
|
||||
const participantsPane = this.participant.getParticipantsPane();
|
||||
const isOpen = await participantsPane.isOpen();
|
||||
|
||||
if (!isOpen) {
|
||||
await participantsPane.open();
|
||||
}
|
||||
|
||||
return this.participant.driver.$('#visitor-list-header').getText();
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the visitors queue UI is shown.
|
||||
*/
|
||||
isVisitorsQueueUIShown() {
|
||||
return this.participant.driver.$('#visitors-waiting-queue').isDisplayed();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the knocking participant (the only one) that is displayed on the notification.
|
||||
*/
|
||||
async getWaitingVisitorsInQueue() {
|
||||
const goLiveNotification
|
||||
= this.participant.driver.$('//div[@data-testid="notify.waitingVisitors"]');
|
||||
|
||||
await goLiveNotification.waitForDisplayed({
|
||||
timeout: 3000,
|
||||
timeoutMsg: 'Go live notification not displayed'
|
||||
});
|
||||
|
||||
return await goLiveNotification.getText();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clicks the go live button in the visitors notification.
|
||||
*/
|
||||
async goLive() {
|
||||
return this.participant.driver.$('//button[@data-testid="participantsPane.actions.goLive"]').click();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user