2024-12-10 11:22:44 -06:00
|
|
|
import { Participant } from '../helpers/Participant';
|
|
|
|
|
|
|
|
|
|
const CLOSE_BUTTON = 'modal-header-close-button';
|
2024-12-12 08:29:15 -06:00
|
|
|
const OK_BUTTON = 'modal-dialog-ok-button';
|
2024-12-10 11:22:44 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 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();
|
|
|
|
|
}
|
2024-12-12 08:29:15 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Clicks on the ok button.
|
|
|
|
|
*/
|
|
|
|
|
async clickOkButton(): Promise<void> {
|
|
|
|
|
await this.participant.driver.$(`#${OK_BUTTON}`).click();
|
|
|
|
|
}
|
2024-12-10 11:22:44 -06:00
|
|
|
}
|