[Discover] Loading spinner cleanup (#79819)
This commit is contained in:
parent
591585df17
commit
3f3589d74b
|
@ -211,12 +211,7 @@ export function DiscoverLegacy({
|
|||
/>
|
||||
)}
|
||||
{resultState === 'uninitialized' && <DiscoverUninitialized onRefresh={fetch} />}
|
||||
{/* @TODO: Solved in the Angular way to satisfy functional test - should be improved*/}
|
||||
<span style={{ display: resultState !== 'loading' ? 'none' : '' }}>
|
||||
<div className="dscOverlay">
|
||||
<LoadingSpinner />
|
||||
</div>
|
||||
</span>
|
||||
{resultState === 'loading' && <LoadingSpinner />}
|
||||
{resultState === 'ready' && (
|
||||
<div className="dscWrapper__content">
|
||||
<SkipBottomButton onClick={onSkipBottomButtonClick} />
|
||||
|
|
|
@ -22,7 +22,7 @@ import { FormattedMessage } from '@kbn/i18n/react';
|
|||
|
||||
export function LoadingSpinner() {
|
||||
return (
|
||||
<>
|
||||
<div className="dscOverlay">
|
||||
<EuiTitle size="s" data-test-subj="loadingSpinnerText">
|
||||
<h2>
|
||||
<FormattedMessage id="discover.searchingTitle" defaultMessage="Searching" />
|
||||
|
@ -30,6 +30,6 @@ export function LoadingSpinner() {
|
|||
</EuiTitle>
|
||||
<EuiSpacer size="m" />
|
||||
<EuiLoadingSpinner size="l" data-test-subj="loadingSpinner" />
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -27,10 +27,10 @@ export function DiscoverPageProvider({ getService, getPageObjects }: FtrProvider
|
|||
const { header } = getPageObjects(['header']);
|
||||
const browser = getService('browser');
|
||||
const globalNav = getService('globalNav');
|
||||
const config = getService('config');
|
||||
const defaultFindTimeout = config.get('timeouts.find');
|
||||
const elasticChart = getService('elasticChart');
|
||||
const docTable = getService('docTable');
|
||||
const config = getService('config');
|
||||
const defaultFindTimeout = config.get('timeouts.find');
|
||||
|
||||
class DiscoverPage {
|
||||
public async getChartTimespan() {
|
||||
|
@ -84,8 +84,7 @@ export function DiscoverPageProvider({ getService, getPageObjects }: FtrProvider
|
|||
}
|
||||
|
||||
public async waitUntilSearchingHasFinished() {
|
||||
const spinner = await testSubjects.find('loadingSpinner');
|
||||
await find.waitForElementHidden(spinner, defaultFindTimeout * 10);
|
||||
await testSubjects.missingOrFail('loadingSpinner', { timeout: defaultFindTimeout * 10 });
|
||||
}
|
||||
|
||||
public async getColumnHeaders() {
|
||||
|
|
Loading…
Reference in a new issue