mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +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> {
|
clickMenuItem(label: string): promise.Promise<void> {
|
||||||
return this.getItemByLabel(label).click();
|
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));
|
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 {
|
getButtonByLabel(label: string): ElementFinder {
|
||||||
return this.component.element(by.cssContainingText(ToolbarActions.selectors.button, label));
|
return this.component.element(by.cssContainingText(ToolbarActions.selectors.button, label));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user