[ACA-2062] toolbar updates (#847)

* john-doclist-actions-ACA-2062

* add “simpletask” to ignore list

* fix e2e

* add workaround for Favorites

* isSharedFile state evaluator

* update docs

* update store on share file modal closed

* share action definition

* rename evaluator

* context menu rule

* check for file selection

* use another selector

* update tests

* viewer share action

* fix e2e tests

* update viewer button ids
This commit is contained in:
john-knowles
2018-12-05 11:27:22 +00:00
committed by Denys Vuika
parent 8d64dfb0e8
commit 12a72afdac
14 changed files with 353 additions and 225 deletions

View File

@@ -30,12 +30,16 @@ import { Component } from '../component';
export class Toolbar extends Component {
private static selectors = {
root: '.adf-toolbar',
// button: '.mat-icon-button'
button: 'button'
button: 'button',
share: `.mat-icon-button[title='Share']`,
shareEdit: `.mat-icon-button[title='Shared link settings']`
};
menu: Menu = new Menu();
buttons: ElementArrayFinder = this.component.all(by.css(Toolbar.selectors.button));
shareButton: ElementFinder = this.component.element(by.css(Toolbar.selectors.share));
shareEditButton: ElementFinder = this.component.element(by.css(Toolbar.selectors.shareEdit));
constructor(ancestor?: ElementFinder) {
super(Toolbar.selectors.root, ancestor);
@@ -82,4 +86,22 @@ export class Toolbar extends Component {
const btn = this.getButtonByTitleAttribute(title);
await btn.click();
}
async clickShareButton() {
const btn = this.shareButton;
await btn.click();
}
async isShareButtonPresent() {
return await browser.isElementPresent(this.shareButton);
}
async clickShareEditButton() {
const btn = this.shareEditButton;
await btn.click();
}
async isShareEditButtonPresent() {
return await browser.isElementPresent(this.shareEditButton);
}
}