mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
e2e fix random failing test (#586)
This commit is contained in:
committed by
Denys Vuika
parent
823e80d8ed
commit
5759ea1b62
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -167,8 +167,10 @@ describe('Page titles', () => {
|
||||
});
|
||||
|
||||
it('Search Results page - [C280413]', async () => {
|
||||
await header.waitForSearchButton();
|
||||
await header.searchButton.click();
|
||||
await page.dataTable.waitForHeader();
|
||||
await header.waitForSearchBar();
|
||||
await header.searchForText(file);
|
||||
expect(await browser.getTitle()).toContain(PAGE_TITLES.SEARCH);
|
||||
});
|
||||
|
Reference in New Issue
Block a user