[ML] Functional tests - stabilize job row and analytics result view assertions (#56595) (#56751)

This PR makes assertions of the job row and analytics result views more robust against loading time issues during test execution.
This commit is contained in:
Robert Oskamp 2020-02-04 19:53:10 +01:00 committed by GitHub
parent 7b0067fe6e
commit 27e58b5e94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -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) {

View file

@ -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);