From 44f61015f5eb0a0cbfdfaf44e1b0a02f74b16b2b Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 1 Jun 2020 14:01:05 +0200 Subject: [PATCH] packages/test-utils: add missing wrappapper props --- packages/test-utils/src/testUtils/appWrappers.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/test-utils/src/testUtils/appWrappers.tsx b/packages/test-utils/src/testUtils/appWrappers.tsx index c5839610d3..7849ed20cc 100644 --- a/packages/test-utils/src/testUtils/appWrappers.tsx +++ b/packages/test-utils/src/testUtils/appWrappers.tsx @@ -14,19 +14,24 @@ * limitations under the License. */ -import React, { ComponentType, ReactNode, FunctionComponent } from 'react'; +import React, { ComponentType, ReactNode, FunctionComponent, FC } from 'react'; import { MemoryRouter } from 'react-router'; import { Route } from 'react-router-dom'; import { lightTheme } from '@backstage/theme'; import privateExports, { defaultSystemIcons, ApiTestRegistry, + BootErrorPageProps, } from '@backstage/core-api'; const { PrivateAppImpl } = privateExports; const NotFoundErrorPage = () => { throw new Error('Reached NotFound Page'); }; +const BootErrorPage: FC = ({ step, error }) => { + throw new Error(`Reached BootError Page at step ${step} with error ${error}`); +}; +const Progress = () =>
; /** * Options to customize the behavior of the test app wrapper. @@ -48,6 +53,8 @@ export function wrapInTestApp( apis: new ApiTestRegistry(), components: { NotFoundErrorPage, + BootErrorPage, + Progress, }, icons: defaultSystemIcons, plugins: [], @@ -59,6 +66,7 @@ export function wrapInTestApp( variant: 'light', }, ], + configLoader: async () => ({}), }); let Wrapper: ComponentType;