mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Clear core loading indicator just before UI is rendered (#55242)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
2bf111c50f
commit
b0af1bf95c
2 changed files with 11 additions and 11 deletions
|
@ -429,15 +429,14 @@ describe('Notifications targetDomElement', () => {
|
|||
rootDomElement,
|
||||
});
|
||||
|
||||
let targetDomElementParentInStart: HTMLElement | null;
|
||||
let targetDomElementInStart: HTMLElement | null;
|
||||
MockNotificationsService.start.mockImplementation(({ targetDomElement }): any => {
|
||||
expect(targetDomElement.parentElement).not.toBeNull();
|
||||
targetDomElementParentInStart = targetDomElement.parentElement;
|
||||
targetDomElementInStart = targetDomElement;
|
||||
});
|
||||
|
||||
// Starting the core system should pass the targetDomElement as a child of the rootDomElement
|
||||
await core.setup();
|
||||
await core.start();
|
||||
expect(targetDomElementParentInStart!).toBe(rootDomElement);
|
||||
expect(targetDomElementInStart!.parentElement).toBe(rootDomElement);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -222,13 +222,6 @@ export class CoreSystem {
|
|||
const notificationsTargetDomElement = document.createElement('div');
|
||||
const overlayTargetDomElement = document.createElement('div');
|
||||
|
||||
// ensure the rootDomElement is empty
|
||||
this.rootDomElement.textContent = '';
|
||||
this.rootDomElement.classList.add('coreSystemRootDomElement');
|
||||
this.rootDomElement.appendChild(coreUiTargetDomElement);
|
||||
this.rootDomElement.appendChild(notificationsTargetDomElement);
|
||||
this.rootDomElement.appendChild(overlayTargetDomElement);
|
||||
|
||||
const overlays = this.overlay.start({
|
||||
i18n,
|
||||
targetDomElement: overlayTargetDomElement,
|
||||
|
@ -276,6 +269,14 @@ export class CoreSystem {
|
|||
};
|
||||
|
||||
const plugins = await this.plugins.start(core);
|
||||
|
||||
// ensure the rootDomElement is empty
|
||||
this.rootDomElement.textContent = '';
|
||||
this.rootDomElement.classList.add('coreSystemRootDomElement');
|
||||
this.rootDomElement.appendChild(coreUiTargetDomElement);
|
||||
this.rootDomElement.appendChild(notificationsTargetDomElement);
|
||||
this.rootDomElement.appendChild(overlayTargetDomElement);
|
||||
|
||||
const rendering = this.rendering.start({
|
||||
application,
|
||||
chrome,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue