From 27e58b5e942d45e04522b72dc8f69de186e016c1 Mon Sep 17 00:00:00 2001 From: Robert Oskamp Date: Tue, 4 Feb 2020 19:53:10 +0100 Subject: [PATCH] [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. --- .../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 0324b440548bc..1d710a1c4cec7 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 eed6d180b4dca..153a0ac477b47 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);