[Infra UI] Process tab flaky test fix- Wait for page loading (#165440)

Closes #160796 

## Summary

As we see in the picture from the failed build we are trying to check
the values when there are still spinners on the screen (so the data is
still loading).

<img width="1791" alt="image"
src="94608e6b-21b1-4435-9cee-efbf5a57f4ac">


To fix that I am now waiting for the page to load. This PR will be
backported to fix the issue in 8.9 and I will add a follow-up PR
(https://github.com/elastic/kibana/pull/165303) for the same fix in node
details tests.


[Build](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3035)
This commit is contained in:
jennypavlova 2023-09-01 15:06:58 +02:00 committed by GitHub
parent 21f3ebd6e9
commit 7bb86679fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -344,6 +344,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
describe('Processes Tab', () => {
it('should render processes tab and with Total Value summary', async () => {
await pageObjects.infraHostsView.clickProcessesFlyoutTab();
await pageObjects.header.waitUntilLoadingHasFinished();
const processesTotalValue =
await pageObjects.infraHostsView.getProcessesTabContentTotalValue();
const processValue = await processesTotalValue.getVisibleText();