mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[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:
committed by
Denys Vuika
parent
8d64dfb0e8
commit
12a72afdac
@@ -35,7 +35,9 @@ export class Menu extends Component {
|
||||
icon: '.mat-icon',
|
||||
uploadFiles: 'app-upload-files',
|
||||
|
||||
submenu: 'app-context-menu-item .mat-menu-item'
|
||||
submenu: 'app-context-menu-item .mat-menu-item',
|
||||
|
||||
share: `[data-automation-id='share-action-button']`
|
||||
};
|
||||
|
||||
items: ElementArrayFinder = this.component.all(by.css(Menu.selectors.item));
|
||||
@@ -43,6 +45,9 @@ export class Menu extends Component {
|
||||
uploadFiles: ElementFinder = browser.element(by.id(Menu.selectors.uploadFiles));
|
||||
submenus: ElementArrayFinder = browser.element.all(by.css(Menu.selectors.submenu));
|
||||
|
||||
shareAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.share, 'Share'));
|
||||
shareEditAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.share, 'Shared link settings'));
|
||||
|
||||
constructor(ancestor?: ElementFinder) {
|
||||
super(Menu.selectors.root, ancestor);
|
||||
}
|
||||
@@ -167,4 +172,14 @@ export class Menu extends Component {
|
||||
uploadFile() {
|
||||
return this.uploadFiles;
|
||||
}
|
||||
|
||||
async clickShareAction() {
|
||||
const action = this.shareAction;
|
||||
await action.click();
|
||||
}
|
||||
|
||||
async clickShareEditAction() {
|
||||
const action = this.shareEditAction;
|
||||
await action.click();
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user