Files
jitsi-meet/tests/pageobjects/BaseDialog.ts
Дамян Минков 2dc135b80f feat(tests): Adds avatar test. (#15382)
* feat(tests): Adds join options.

* fix(tests): Fix opening tests by default with tenant.

* fix(tests): Renames a method.

* fix(tests): Moves a method from filmstrip to participants pane.

* fix(tests): Adds ok button to base dialog.

* fix(tests): Adds missing checks for using iframe API.

* feat(tests): Prettify the result html on error.

* fix(tests): Fixes checking when not in room.

* fix(tests): Adds profile button to toolbar.

* fix(tests): Adds avatar test.

* fix(tests): Fix all execute methods and await.

* fix(tests): Fix avatar checks.
2024-12-12 08:29:15 -06:00

35 lines
809 B
TypeScript

import { Participant } from '../helpers/Participant';
const CLOSE_BUTTON = 'modal-header-close-button';
const OK_BUTTON = 'modal-dialog-ok-button';
/**
* Base class for all dialogs.
*/
export default class BaseDialog {
participant: Participant;
/**
* Initializes for a participant.
*
* @param {Participant} participant - The participant.
*/
constructor(participant: Participant) {
this.participant = participant;
}
/**
* Clicks on the X (close) button.
*/
async clickCloseButton(): Promise<void> {
await this.participant.driver.$(`#${CLOSE_BUTTON}`).click();
}
/**
* Clicks on the ok button.
*/
async clickOkButton(): Promise<void> {
await this.participant.driver.$(`#${OK_BUTTON}`).click();
}
}