diff --git a/x-pack/solutions/observability/test/functional/apps/infra/feature_controls/infrastructure_security.ts b/x-pack/solutions/observability/test/functional/apps/infra/feature_controls/infrastructure_security.ts index 008e65dd9a9d3..9a7b2e51f9074 100644 --- a/x-pack/solutions/observability/test/functional/apps/infra/feature_controls/infrastructure_security.ts +++ b/x-pack/solutions/observability/test/functional/apps/infra/feature_controls/infrastructure_security.ts @@ -95,16 +95,27 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it(`shows Wafflemap`, async () => { - await PageObjects.common.navigateToUrlWithBrowserHistory('infraOps', '', undefined, { - ensureCurrentUrl: true, - shouldLoginIfPrompted: false, - }); + await PageObjects.common.navigateToUrlWithBrowserHistory( + 'infraOps', + '/inventory', + undefined, + { + ensureCurrentUrl: true, + shouldLoginIfPrompted: false, + } + ); await PageObjects.header.waitUntilLoadingHasFinished(); - await retry.tryForTime(5000, async () => { + await retry.tryForTime(30000, async () => { + await testSubjects.existOrFail('waffleDatePicker'); + }); + + expect(await testSubjects.exists('waffleMap')).to.be(false); + + await retry.tryForTime(60000, async () => { await PageObjects.infraHome.goToTime(DATE_WITH_DATA); - await testSubjects.existOrFail('~waffleMap'); + await PageObjects.infraHome.getWaffleMap(); }); }); @@ -202,16 +213,27 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it(`shows Wafflemap`, async () => { - await PageObjects.common.navigateToUrlWithBrowserHistory('infraOps', '', undefined, { - ensureCurrentUrl: true, - shouldLoginIfPrompted: false, - }); + await PageObjects.common.navigateToUrlWithBrowserHistory( + 'infraOps', + '/inventory', + undefined, + { + ensureCurrentUrl: true, + shouldLoginIfPrompted: false, + } + ); await PageObjects.header.waitUntilLoadingHasFinished(); - await retry.tryForTime(5000, async () => { + await retry.tryForTime(30000, async () => { + await testSubjects.existOrFail('waffleDatePicker'); + }); + + expect(await testSubjects.exists('waffleMap')).to.be(false); + + await retry.tryForTime(60000, async () => { await PageObjects.infraHome.goToTime(DATE_WITH_DATA); - await testSubjects.existOrFail('~waffleMap'); + await PageObjects.infraHome.getWaffleMap(); }); });