import { by } from 'protractor' ; import { GenericDialog } from '../dialog/generic-dialog' ; import { DropDownBreadcrumb } from '../breadcrumb/dropdown-breadcrumb' ; import { DataTable } from '../data-table/data-table' ; import { isPresentAndEnabled } from '../../utilities/utils' ; import { BrowserActions } from '@alfresco/adf-testing' ; export class SelectTemplateDialog extends GenericDialog { nextButton = this . childElement ( by . css ( '[data-automation-id="content-node-selector-actions-choose"]' ) ) ; cancelButton = this . childElement ( by . css ( '[data-automation-id="content-node-selector-actions-cancel"]' ) ) ; breadcrumb = new DropDownBreadcrumb ( ) ; dataTable = new DataTable ( '.aca-template-node-selector-dialog' ) ; constructor ( ) { super ( '.aca-template-node-selector-dialog' ) ; } get content ( ) { return this . rootElem . element ( by . css ( '.adf-content-node-selector-content' ) ) ; } async isCancelButtonEnabled ( ) { return isPresentAndEnabled ( this . cancelButton ) ; } async isNextButtonEnabled ( ) { return isPresentAndEnabled ( this . nextButton ) ; } async clickCancel ( ) { await BrowserActions . click ( this . cancelButton ) ; await this . waitForDialogToClose ( ) ; } async clickNext ( ) { await BrowserActions . click ( this . nextButton ) ; await this . waitForDialogToClose ( ) ; } }