[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:
Dmitry Lemeshko 2020-05-05 11:47:55 +03:00 committed by GitHub
parent 537065a977
commit 43205ec8c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View file

@ -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>

View file

@ -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'));

View file

@ -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 });
},
}; };
} }