[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}>
|
<EuiFlexItem grow={false}>
|
||||||
<EuiLoadingSpinner size="xl" />
|
<EuiLoadingSpinner size="xl" />
|
||||||
</EuiFlexItem>
|
</EuiFlexItem>
|
||||||
<EuiFlexItem>{message}</EuiFlexItem>
|
<EuiFlexItem data-test-subj="loadingMessage">{message}</EuiFlexItem>
|
||||||
</EuiFlexGroup>
|
</EuiFlexGroup>
|
||||||
</EuiPageContent>
|
</EuiPageContent>
|
||||||
</EuiPageBody>
|
</EuiPageBody>
|
||||||
|
|
|
@ -33,6 +33,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
|
||||||
before(async () => {
|
before(async () => {
|
||||||
await esArchiver.load('infra/metrics_and_logs');
|
await esArchiver.load('infra/metrics_and_logs');
|
||||||
await pageObjects.common.navigateToApp('infraOps');
|
await pageObjects.common.navigateToApp('infraOps');
|
||||||
|
await pageObjects.infraHome.waitForLoading();
|
||||||
});
|
});
|
||||||
after(async () => await esArchiver.unload('infra/metrics_and_logs'));
|
after(async () => await esArchiver.unload('infra/metrics_and_logs'));
|
||||||
|
|
||||||
|
|
|
@ -74,5 +74,9 @@ export function InfraHomePageProvider({ getService }: FtrProviderContext) {
|
||||||
await testSubjects.click('configureSourceButton');
|
await testSubjects.click('configureSourceButton');
|
||||||
await testSubjects.exists('sourceConfigurationFlyout');
|
await testSubjects.exists('sourceConfigurationFlyout');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async waitForLoading() {
|
||||||
|
await testSubjects.missingOrFail('loadingMessage', { timeout: 20000 });
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue