From e49ec25fae79ed83245d23cf33edcdaaaf912fcd Mon Sep 17 00:00:00 2001 From: Kevin Lacabane Date: Thu, 14 Oct 2021 22:47:57 +0200 Subject: [PATCH] [Stack Monitoring] Fix monitoring func test (#115013) * add noDataContainer test-subj * remove unnecessary test step * Fix test subjects for overview page * remove unused service * update NoData component snapshots Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../no_data/__snapshots__/no_data.test.js.snap | 2 ++ .../public/components/no_data/no_data.js | 16 ++++++++++------ .../apps/monitoring/enable_monitoring/index.js | 3 --- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/x-pack/plugins/monitoring/public/components/no_data/__snapshots__/no_data.test.js.snap b/x-pack/plugins/monitoring/public/components/no_data/__snapshots__/no_data.test.js.snap index 34a4c049dddccb..8852d104fe00ac 100644 --- a/x-pack/plugins/monitoring/public/components/no_data/__snapshots__/no_data.test.js.snap +++ b/x-pack/plugins/monitoring/public/components/no_data/__snapshots__/no_data.test.js.snap @@ -3,6 +3,7 @@ exports[`NoData should show a default message if reason is unknown 1`] = `

{ + return {children}; + }; + if (isCloudEnabled) { return ( - +

- + ); } if (useInternalCollection) { return ( - +

- + ); } return ( - +

- + ); } diff --git a/x-pack/test/functional/apps/monitoring/enable_monitoring/index.js b/x-pack/test/functional/apps/monitoring/enable_monitoring/index.js index 79bd479c45a177..cce6401453d216 100644 --- a/x-pack/test/functional/apps/monitoring/enable_monitoring/index.js +++ b/x-pack/test/functional/apps/monitoring/enable_monitoring/index.js @@ -11,7 +11,6 @@ export default function ({ getService, getPageObjects }) { const PageObjects = getPageObjects(['monitoring', 'common', 'header']); const esSupertest = getService('esSupertest'); const noData = getService('monitoringNoData'); - const testSubjects = getService('testSubjects'); const clusterOverview = getService('monitoringClusterOverview'); const retry = getService('retry'); const esDeleteAllIndices = getService('esDeleteAllIndices'); @@ -53,8 +52,6 @@ export default function ({ getService, getPageObjects }) { // Here we are checking that once Monitoring is enabled, // it moves on to the cluster overview page. await retry.tryForTime(20000, async () => { - // Click the refresh button - await testSubjects.click('querySubmitButton'); await clusterOverview.closeAlertsModal(); expect(await clusterOverview.isOnClusterOverview()).to.be(true); });