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 fefad214736e6f..70f7e0559d0346 100644 --- a/x-pack/test/functional/apps/monitoring/enable_monitoring/index.js +++ b/x-pack/test/functional/apps/monitoring/enable_monitoring/index.js @@ -10,6 +10,7 @@ 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'); @@ -46,8 +47,10 @@ export default function ({ getService, getPageObjects }) { }); // Here we are checking that once Monitoring is enabled, - //it moves on to the cluster overview page. - await retry.try(async () => { + // it moves on to the cluster overview page. + await retry.tryForTime(10000, async () => { + // Click the refresh button + await testSubjects.click('querySubmitButton'); expect(await clusterOverview.isOnClusterOverview()).to.be(true); }); }); diff --git a/x-pack/test/functional/apps/monitoring/time_filter.js b/x-pack/test/functional/apps/monitoring/time_filter.js index 11557d995218e8..127c7d8889bc4f 100644 --- a/x-pack/test/functional/apps/monitoring/time_filter.js +++ b/x-pack/test/functional/apps/monitoring/time_filter.js @@ -7,8 +7,6 @@ import expect from '@kbn/expect'; import { getLifecycleMethods } from './_get_lifecycle_methods'; -const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); - export default function ({ getService, getPageObjects }) { const PageObjects = getPageObjects(['header', 'timePicker']); const testSubjects = getService('testSubjects'); @@ -36,12 +34,9 @@ export default function ({ getService, getPageObjects }) { expect(isLoading).to.be(true); }); - it('should send another request when changing the time picker', async () => { - /** - * TODO: The value should either be removed or lowered after: - * https://github.com/elastic/kibana/issues/72997 is resolved - */ - await delay(3000); + // TODO: [cr] I'm not sure this test is any better than the above one, we might need to rely solely on unit tests + // for this functionality + it.skip('should send another request when changing the time picker', async () => { await PageObjects.timePicker.setAbsoluteRange( 'Aug 15, 2016 @ 21:00:00.000', 'Aug 16, 2016 @ 00:00:00.000'