[ACA-1797] add tests for viewer actions extension (#666)

This commit is contained in:
Adina Parpalita
2018-09-25 11:29:21 +03:00
committed by Denys Vuika
parent 8f0ae1a917
commit b2b0da4c86
5 changed files with 996 additions and 756 deletions

View File

@@ -69,6 +69,10 @@ export class Menu extends Component {
return this.component.element(by.cssContainingText(Menu.selectors.item, menuItem));
}
getItemById(id: string) {
return this.component.element(by.id(id));
}
getItemTooltip(menuItem: string): promise.Promise<string> {
return this.getItemByLabel(menuItem).getAttribute('title');
}
@@ -78,6 +82,10 @@ export class Menu extends Component {
}
getItemIdAttribute(menuItem: string) {
return this.getItemByLabel(menuItem).getAttribute('id');
}
getItemsCount(): promise.Promise<number> {
return this.items.count();
}

View File

@@ -56,6 +56,10 @@ export class Toolbar extends Component {
return this.component.element(by.css(`${Toolbar.selectors.button}[title="${title}"]`));
}
getButtonById(id: string) {
return this.component.element(by.id(id));
}
async openMoreMenu() {
await this.getButtonByTitleAttribute('More actions').click();
await this.menu.waitForMenuToOpen();