Skip to content

Commit

Permalink
[ML] Functional tests - stabilize job row and analytics result view a…
Browse files Browse the repository at this point in the history
…ssertions (elastic#56595) (elastic#56751)

This PR makes assertions of the job row and analytics result views more robust against loading time issues during test execution.
  • Loading branch information
pheyos committed Feb 4, 2020
1 parent 7b0067f commit 27e58b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export function MachineLearningDataFrameAnalyticsTableProvider({ getService }: F
public async openResultsView() {
await this.assertJobViewButtonExists();
await testSubjects.click('mlAnalyticsJobViewButton');
await testSubjects.existOrFail('mlPageDataFrameAnalyticsExploration', { timeout: 5000 });
await testSubjects.existOrFail('mlPageDataFrameAnalyticsExploration', { timeout: 20 * 1000 });
}

public async filterWithSearchString(filter: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ export function MachineLearningJobTableProvider({ getService }: FtrProviderConte
}

public async assertJobRowFields(jobId: string, expectedRow: object) {
await this.refreshJobList();
const rows = await this.parseJobTable();
const jobRow = rows.filter(row => row.id === jobId)[0];
expect(jobRow).to.eql(expectedRow);
Expand Down

0 comments on commit 27e58b5

Please sign in to comment.