Skip to content

Commit

Permalink
[functional tests] Wait for url to update when removing all filters (e…
Browse files Browse the repository at this point in the history
…lastic#11108)

* [functional tests] Wait for url to update when removing all filters

* [functional tests] waitUntilUrlFound -> waitUntilUrlIncludes
  • Loading branch information
jbudz committed Apr 10, 2017
1 parent 1067788 commit bf8ea3e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/support/page_objects/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ export default class Common {
}
}

waitUntilUrlIncludes(path) {
return this.tryForTime(defaultFindTimeout, async () => {
const url = await this.remote.getCurrentUrl();
if (!url.includes(path)) throw new Error('Url not found');
});
}

getHostPort() {
return getUrl.baseUrl(config.servers.kibana);
}
Expand Down
1 change: 1 addition & 0 deletions test/support/page_objects/discover_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ export default class DiscoverPage {
await PageObjects.common.clickTestSubject('showFilterActions');
await PageObjects.common.clickTestSubject('removeAllFilters');
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.common.waitUntilUrlIncludes('filters:!()');
}


Expand Down

0 comments on commit bf8ea3e

Please sign in to comment.