Skip to content

Commit 43205ec

Browse files
authored
[functional/page_objects] wait for infra ops page is loaded (#65050)
* [functional/page_objects] wait for infra ops page is loaded * put waiting in PO method
1 parent 537065a commit 43205ec

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

x-pack/plugins/infra/public/components/loading_page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const LoadingPage = ({ message }: LoadingPageProps) => (
2727
<EuiFlexItem grow={false}>
2828
<EuiLoadingSpinner size="xl" />
2929
</EuiFlexItem>
30-
<EuiFlexItem>{message}</EuiFlexItem>
30+
<EuiFlexItem data-test-subj="loadingMessage">{message}</EuiFlexItem>
3131
</EuiFlexGroup>
3232
</EuiPageContent>
3333
</EuiPageBody>

x-pack/test/functional/apps/infra/home_page.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
3333
before(async () => {
3434
await esArchiver.load('infra/metrics_and_logs');
3535
await pageObjects.common.navigateToApp('infraOps');
36+
await pageObjects.infraHome.waitForLoading();
3637
});
3738
after(async () => await esArchiver.unload('infra/metrics_and_logs'));
3839

x-pack/test/functional/page_objects/infra_home_page.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,9 @@ export function InfraHomePageProvider({ getService }: FtrProviderContext) {
7474
await testSubjects.click('configureSourceButton');
7575
await testSubjects.exists('sourceConfigurationFlyout');
7676
},
77+
78+
async waitForLoading() {
79+
await testSubjects.missingOrFail('loadingMessage', { timeout: 20000 });
80+
},
7781
};
7882
}

0 commit comments

Comments
 (0)