mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
add tests for header extension (#701)
This commit is contained in:
committed by
Suzana Dirla
parent
253425971f
commit
d8ad020394
@@ -23,24 +23,32 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ElementFinder, by } from 'protractor';
|
||||
import { ElementFinder, by, browser } from 'protractor';
|
||||
import { Component } from '../component';
|
||||
import { UserInfo } from './user-info';
|
||||
import { protractor } from 'protractor';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { Menu } from '../menu/menu';
|
||||
import { Toolbar } from './../toolbar/toolbar';
|
||||
|
||||
export class Header extends Component {
|
||||
private locators = {
|
||||
root: 'app-header',
|
||||
logoLink: by.css('.app-menu__title'),
|
||||
userInfo: by.css('aca-current-user'),
|
||||
searchButton: by.css('#adf-search-button'),
|
||||
searchBar: by.css('#adf-control-input')
|
||||
searchBar: by.css('#adf-control-input'),
|
||||
moreActions: by.id('app.header.more')
|
||||
};
|
||||
|
||||
logoLink: ElementFinder = this.component.element(this.locators.logoLink);
|
||||
userInfo: UserInfo = new UserInfo(this.component);
|
||||
searchButton: ElementFinder = this.component.element(this.locators.searchButton);
|
||||
searchBar: ElementFinder = this.component.element(this.locators.searchBar);
|
||||
moreActions: ElementFinder = browser.element(this.locators.moreActions);
|
||||
|
||||
menu: Menu = new Menu();
|
||||
toolbar: Toolbar = new Toolbar();
|
||||
|
||||
constructor(ancestor?: ElementFinder) {
|
||||
super('adf-layout-header', ancestor);
|
||||
@@ -59,5 +67,10 @@ export class Header extends Component {
|
||||
async waitForSearchBar() {
|
||||
await Utils.waitUntilElementClickable(this.searchBar);
|
||||
}
|
||||
|
||||
async openMoreMenu() {
|
||||
await this.moreActions.click();
|
||||
await this.menu.waitForMenuToOpen();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user