Adjust global loading indicator data-test-subj for projects (#163697)

## Summary

This PR adjusts the `data-test-subj` for the global loading indicator in
serverless projects such that at matches the stateful version. This
makes sure that functional tests and corresponding test helper methods
continue to work the same in stateful and serverless environments when
comes to waiting for global loading to finish, which is a key mechanism
to avoid test flakiness.

### Additional information

- The serverless project specific global loading indicator was
introduced with #158523
- The stateful loading indicator `data-test-subj` naming is implemented
here:
https://github.com/elastic/kibana/blob/main/packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.tsx#L61

Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
This commit is contained in:
Robert Oskamp 2023-08-11 19:40:26 +02:00 committed by GitHub
parent 2093a1fee3
commit fd08c62f05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -141,14 +141,14 @@ const Logo = (
);
return (
<span css={logo.container}>
<span css={logo.container} data-test-subj="nav-header-logo">
{loadingCount === 0 ? (
<EuiHeaderLogo
iconType="logoElastic"
onClick={navigateHome}
href={fullHref}
css={logo}
data-test-subj="nav-header-logo"
data-test-subj="globalLoadingIndicator-hidden"
aria-label={headerStrings.logo.ariaLabel}
/>
) : (
@ -157,7 +157,7 @@ const Logo = (
size="l"
aria-hidden={false}
onClick={navigateHome}
data-test-subj="nav-header-loading-spinner"
data-test-subj="globalLoadingIndicator"
/>
</a>
)}