mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 11:05:39 -04:00
[User Experience] Add error boundary to prevent UX dashboard from crashing the application (#117583)
* wrap UX dashboard into an error boundary (fixes #117543) * refactor APM root app tests to reuse coreMock Before this change, the tests for the root application component of the APM app were manually mocking the `coreStart` objects required to render the component. After this change, these tests will now reuse the relevant `coreMock` methods. * refactor: fix typo on createAppMountParameters test utility Co-authored-by: Lucas Fernandes da Costa <lucas.fernandesdacosta@elastic.co> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
635cad4817
commit
1b82502dbb
7 changed files with 105 additions and 89 deletions
|
@ -458,7 +458,7 @@ describe('Plugin', () => {
|
|||
const [coreStartMock, startDepsMock] = await coreSetup.getStartServices();
|
||||
const unmountMock = jest.fn();
|
||||
renderAppMock.mockReturnValue(unmountMock);
|
||||
const params = coreMock.createAppMountParamters('/fake/base/path');
|
||||
const params = coreMock.createAppMountParameters('/fake/base/path');
|
||||
|
||||
new Plugin(coreMock.createPluginInitializerContext()).setup(coreSetup);
|
||||
// Grab registered mount function
|
||||
|
@ -528,7 +528,7 @@ import { renderApp } from './application';
|
|||
|
||||
describe('renderApp', () => {
|
||||
it('mounts and unmounts UI', () => {
|
||||
const params = coreMock.createAppMountParamters('/fake/base/path');
|
||||
const params = coreMock.createAppMountParameters('/fake/base/path');
|
||||
const core = coreMock.createStart();
|
||||
|
||||
// Verify some expected DOM element is rendered into the element
|
||||
|
@ -540,7 +540,7 @@ describe('renderApp', () => {
|
|||
});
|
||||
|
||||
it('unsubscribes from uiSettings', () => {
|
||||
const params = coreMock.createAppMountParamters('/fake/base/path');
|
||||
const params = coreMock.createAppMountParameters('/fake/base/path');
|
||||
const core = coreMock.createStart();
|
||||
// Create a fake Subject you can use to monitor observers
|
||||
const settings$ = new Subject();
|
||||
|
@ -555,7 +555,7 @@ describe('renderApp', () => {
|
|||
});
|
||||
|
||||
it('resets chrome visibility', () => {
|
||||
const params = coreMock.createAppMountParamters('/fake/base/path');
|
||||
const params = coreMock.createAppMountParameters('/fake/base/path');
|
||||
const core = coreMock.createStart();
|
||||
|
||||
// Verify stateful Core API was called on mount
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue