You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BaseDialog.ts 600B

1234567891011121314151617181920212223242526
  1. import { Participant } from '../helpers/Participant';
  2. const CLOSE_BUTTON = 'modal-header-close-button';
  3. /**
  4. * Base class for all dialogs.
  5. */
  6. export default class BaseDialog {
  7. participant: Participant;
  8. /**
  9. * Initializes for a participant.
  10. *
  11. * @param {Participant} participant - The participant.
  12. */
  13. constructor(participant: Participant) {
  14. this.participant = participant;
  15. }
  16. /**
  17. * Clicks on the X (close) button.
  18. */
  19. async clickCloseButton(): Promise<void> {
  20. await this.participant.driver.$(`#${CLOSE_BUTTON}`).click();
  21. }
  22. }