Skip to content

Commit

Permalink
Refactor to use missingOrFail
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal committed Oct 12, 2020
1 parent 5921e7e commit 29f58f4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/functional/page_objects/discover_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export function DiscoverPageProvider({ getService, getPageObjects }: FtrProvider
const globalNav = getService('globalNav');
const elasticChart = getService('elasticChart');
const docTable = getService('docTable');
const config = getService('config');
const defaultFindTimeout = config.get('timeouts.find');

class DiscoverPage {
public async getChartTimespan() {
Expand Down Expand Up @@ -82,10 +84,7 @@ export function DiscoverPageProvider({ getService, getPageObjects }: FtrProvider
}

public async waitUntilSearchingHasFinished() {
await retry.waitFor('loading spinner doesnt exist', async () => {
const spinner = await testSubjects.exists('loadingSpinner');
return !spinner;
});
await testSubjects.missingOrFail('loadingSpinner', { timeout: defaultFindTimeout * 10 });
}

public async getColumnHeaders() {
Expand Down

0 comments on commit 29f58f4

Please sign in to comment.