mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
add methods to check if an action is present in the menu
This commit is contained in:
@@ -54,4 +54,8 @@ export class Menu extends Component {
|
||||
clickMenuItem(label: string): promise.Promise<void> {
|
||||
return this.getItemByLabel(label).click();
|
||||
}
|
||||
|
||||
isMenuItemPresent(title: string): promise.Promise<boolean> {
|
||||
return this.component.element(by.cssContainingText(Menu.selectors.item, title)).isPresent();
|
||||
}
|
||||
}
|
||||
|
@@ -36,6 +36,10 @@ export class ToolbarActions extends Component {
|
||||
return this.buttons.count().then(count => (count === 0));
|
||||
}
|
||||
|
||||
isButtonPresent(title: string): promise.Promise<boolean> {
|
||||
return this.component.element(by.css(`${ToolbarActions.selectors.button}[title="${title}"]`)).isPresent();
|
||||
}
|
||||
|
||||
getButtonByLabel(label: string): ElementFinder {
|
||||
return this.component.element(by.cssContainingText(ToolbarActions.selectors.button, label));
|
||||
}
|
||||
|
Reference in New Issue
Block a user