import { by } from 'protractor' ; import { GenericDialog } from '../dialog/generic-dialog' ; import { isPresentAndEnabled } from '../../utilities/utils' ; export class ConfirmDialog extends GenericDialog { okButton = this . childElement ( by . buttonText ( 'OK' ) ) ; cancelButton = this . childElement ( by . buttonText ( 'Cancel' ) ) ; keepButton = this . childElement ( by . buttonText ( 'Keep' ) ) ; deleteButton = this . childElement ( by . buttonText ( 'Delete' ) ) ; removeButton = this . childElement ( by . buttonText ( 'Remove' ) ) ; constructor ( ) { super ( 'adf-confirm-dialog' ) ; } async getText ( ) { return this . content . getText ( ) ; } async isOkEnabled ( ) { return isPresentAndEnabled ( this . okButton ) ; } async isCancelEnabled ( ) { return isPresentAndEnabled ( this . cancelButton ) ; } async isKeepEnabled ( ) { return isPresentAndEnabled ( this . keepButton ) ; } async isDeleteEnabled ( ) { return isPresentAndEnabled ( this . deleteButton ) ; } async isRemoveEnabled ( ) { return isPresentAndEnabled ( this . removeButton ) ; } }