2024-12-20 06:17:49 -06:00
|
|
|
import BasePageObject from './BasePageObject';
|
2024-12-10 11:22:44 -06:00
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
*/
|
2024-12-20 06:17:49 -06:00
|
|
|
export default class BaseDialog extends BasePageObject {
|
2024-12-10 11:22:44 -06:00
|
|
|
/**
|
|
|
|
|
* Clicks on the X (close) button.
|
|
|
|
|
*/
|
2025-01-23 08:13:57 -06:00
|
|
|
clickCloseButton(): Promise<void> {
|
|
|
|
|
return this.participant.driver.$(`#${CLOSE_BUTTON}`).click();
|
2024-12-10 11:22:44 -06:00
|
|
|
}
|
2024-12-12 08:29:15 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Clicks on the ok button.
|
|
|
|
|
*/
|
2025-01-23 08:13:57 -06:00
|
|
|
clickOkButton(): Promise<void> {
|
|
|
|
|
return this.participant.driver.$(`#${OK_BUTTON}`).click();
|
2024-12-12 08:29:15 -06:00
|
|
|
}
|
2024-12-10 11:22:44 -06:00
|
|
|
}
|