import { by } from 'protractor' ; import { GenericDialog } from '../dialog/generic-dialog' ; import { BrowserActions } from '@alfresco/adf-testing' ; import { Menu } from '../menu/menu' ; export class ManageVersionsDialog extends GenericDialog { closeButton = this . childElement ( by . cssContainingText ( '.mat-button' , 'Close' ) ) ; menu = new Menu ( ) ; constructor ( ) { super ( '.aca-node-versions-dialog' ) ; } async clickClose ( ) { await BrowserActions . click ( this . closeButton ) ; await this . waitForDialogToClose ( ) ; } async clickActionButton ( version ) { await BrowserActions . click ( this . childElement ( by . id ( `adf-version-list-action-menu-button-${ version }` ) ) ) ; await this . menu . waitForMenuToOpen ( ) ; } async viewFileVersion ( version ) { await this . clickActionButton ( version ) ; await this . menu . clickMenuItem ( 'View' ) ; } }