diff --git a/x-pack/plugins/infra/public/components/loading_page.tsx b/x-pack/plugins/infra/public/components/loading_page.tsx
index ae179c6542c13..9d37fed45b583 100644
--- a/x-pack/plugins/infra/public/components/loading_page.tsx
+++ b/x-pack/plugins/infra/public/components/loading_page.tsx
@@ -27,7 +27,7 @@ export const LoadingPage = ({ message }: LoadingPageProps) => (
- {message}
+ {message}
diff --git a/x-pack/test/functional/apps/infra/home_page.ts b/x-pack/test/functional/apps/infra/home_page.ts
index ed8bec570ab60..28d7956e353e1 100644
--- a/x-pack/test/functional/apps/infra/home_page.ts
+++ b/x-pack/test/functional/apps/infra/home_page.ts
@@ -33,6 +33,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
before(async () => {
await esArchiver.load('infra/metrics_and_logs');
await pageObjects.common.navigateToApp('infraOps');
+ await pageObjects.infraHome.waitForLoading();
});
after(async () => await esArchiver.unload('infra/metrics_and_logs'));
diff --git a/x-pack/test/functional/page_objects/infra_home_page.ts b/x-pack/test/functional/page_objects/infra_home_page.ts
index 998a60500aca2..51dad594f21f5 100644
--- a/x-pack/test/functional/page_objects/infra_home_page.ts
+++ b/x-pack/test/functional/page_objects/infra_home_page.ts
@@ -74,5 +74,9 @@ export function InfraHomePageProvider({ getService }: FtrProviderContext) {
await testSubjects.click('configureSourceButton');
await testSubjects.exists('sourceConfigurationFlyout');
},
+
+ async waitForLoading() {
+ await testSubjects.missingOrFail('loadingMessage', { timeout: 20000 });
+ },
};
}