Skip to content

Commit

Permalink
Adjust global loading indicator data-test-subj for projects (elastic#…
Browse files Browse the repository at this point in the history
…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 elastic#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 <[email protected]>
(cherry picked from commit fd08c62)
  • Loading branch information
pheyos committed Aug 11, 2023
1 parent 6cfb565 commit e95f49d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,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}
/>
) : (
Expand All @@ -148,7 +148,7 @@ const Logo = (
size="l"
aria-hidden={false}
onClick={navigateHome}
data-test-subj="nav-header-loading-spinner"
data-test-subj="globalLoadingIndicator"
/>
</a>
)}
Expand Down

0 comments on commit e95f49d

Please sign in to comment.