From 4f267413c84a6d928076483362de16490c22d3e8 Mon Sep 17 00:00:00 2001 From: Robert Oskamp Date: Tue, 4 Feb 2020 16:08:17 +0100 Subject: [PATCH] [ML] Functional tests - stabilize job row and analytics result view assertions (#56595) This PR makes assertions of the job row and analytics result views more robust against loading time issues during test execution. --- .../services/machine_learning/data_frame_analytics_table.ts | 2 +- x-pack/test/functional/services/machine_learning/job_table.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/test/functional/services/machine_learning/data_frame_analytics_table.ts b/x-pack/test/functional/services/machine_learning/data_frame_analytics_table.ts index 0324b440548bc4..1d710a1c4cec72 100644 --- a/x-pack/test/functional/services/machine_learning/data_frame_analytics_table.ts +++ b/x-pack/test/functional/services/machine_learning/data_frame_analytics_table.ts @@ -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) { diff --git a/x-pack/test/functional/services/machine_learning/job_table.ts b/x-pack/test/functional/services/machine_learning/job_table.ts index eed6d180b4dca9..153a0ac477b47b 100644 --- a/x-pack/test/functional/services/machine_learning/job_table.ts +++ b/x-pack/test/functional/services/machine_learning/job_table.ts @@ -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);