From 9a29a0c473c26aebcad3774503a4444fbda9f5a7 Mon Sep 17 00:00:00 2001 From: Dima Arnautov Date: Wed, 17 Jun 2020 17:36:13 +0200 Subject: [PATCH] [ML] PR remarks --- x-pack/test/functional/services/ml/anomaly_explorer.ts | 9 +++++++-- x-pack/test/functional/services/ml/test_resources.ts | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/x-pack/test/functional/services/ml/anomaly_explorer.ts b/x-pack/test/functional/services/ml/anomaly_explorer.ts index 629835043796..7c479a423467 100644 --- a/x-pack/test/functional/services/ml/anomaly_explorer.ts +++ b/x-pack/test/functional/services/ml/anomaly_explorer.ts @@ -77,11 +77,16 @@ export function MachineLearningAnomalyExplorerProvider({ getService }: FtrProvid await this.filterWithSearchString(dashboardTitle); await testSubjects.isDisplayed('mlDashboardSelectionTable > checkboxSelectAll'); await testSubjects.click('mlDashboardSelectionTable > checkboxSelectAll'); - await testSubjects.isChecked('mlDashboardSelectionTable > checkboxSelectAll'); + expect(await testSubjects.isChecked('mlDashboardSelectionTable > checkboxSelectAll')).to.be( + true + ); await testSubjects.clickWhenNotDisabled('mlAddAndEditDashboardButton'); const embeddable = await testSubjects.find('mlAnomalySwimlaneEmbeddableWrapper'); const swimlane = await embeddable.findByClassName('ml-swimlanes'); - expect(await swimlane.isDisplayed()).to.be(true); + expect(await swimlane.isDisplayed()).to.eql( + true, + 'Anomaly swimlane should be displayed in dashboard' + ); }, async waitForDashboardsToLoad() { diff --git a/x-pack/test/functional/services/ml/test_resources.ts b/x-pack/test/functional/services/ml/test_resources.ts index 8331cd27630d..9927c987bbea 100644 --- a/x-pack/test/functional/services/ml/test_resources.ts +++ b/x-pack/test/functional/services/ml/test_resources.ts @@ -315,8 +315,8 @@ export function MachineLearningTestResourcesProvider({ getService }: FtrProvider }, async deleteDashboards() { - for (const search of Object.values(dashboards)) { - await this.deleteDashboardByTitle(search.requestBody.attributes.title); + for (const dashboard of Object.values(dashboards)) { + await this.deleteDashboardByTitle(dashboard.requestBody.attributes.title); } },