[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
This commit is contained in:
parent
537065a977
commit
43205ec8c7
|
@ -27,7 +27,7 @@ export const LoadingPage = ({ message }: LoadingPageProps) => (
|
|||
<EuiFlexItem grow={false}>
|
||||
<EuiLoadingSpinner size="xl" />
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem>{message}</EuiFlexItem>
|
||||
<EuiFlexItem data-test-subj="loadingMessage">{message}</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
</EuiPageContent>
|
||||
</EuiPageBody>
|
||||
|
|
|
@ -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'));
|
||||
|
||||
|
|
|
@ -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 });
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue