e2e fix random failing test (#586)

This commit is contained in:
Suzana Dirla
2018-08-29 10:17:05 +03:00
committed by Denys Vuika
parent 823e80d8ed
commit 5759ea1b62
2 changed files with 14 additions and 3 deletions

View File

@@ -27,6 +27,7 @@ import { ElementFinder, by } from 'protractor';
import { Component } from '../component';
import { UserInfo } from './user-info';
import { protractor } from 'protractor';
import { Utils } from '../../utilities/utils';
export class Header extends Component {
private locators = {
@@ -50,5 +51,13 @@ export class Header extends Component {
.then(() => this.searchBar.sendKeys(text))
.then(() => this.searchBar.sendKeys(protractor.Key.ENTER));
}
async waitForSearchButton() {
return await Utils.waitUntilElementClickable(this.searchButton);
}
async waitForSearchBar() {
return await Utils.waitUntilElementClickable(this.searchBar);
}
}