core-components: add test for ProxiedSignInPage

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-01-10 19:27:34 +01:00
parent f56b7290da
commit bb4089890b
6 changed files with 119 additions and 0 deletions
@@ -25,6 +25,7 @@ import { themes, UnifiedThemeProvider } from '@backstage/theme';
import MockIcon from '@material-ui/icons/AcUnit';
import { createSpecializedApp } from '@backstage/core-app-api';
import {
AppComponents,
attachComponentData,
BootErrorPageProps,
createRouteRef,
@@ -101,6 +102,11 @@ export type TestAppOptions = {
* const link = useRouteRef(myRouteRef)
*/
mountedRoutes?: { [path: string]: RouteRef | ExternalRouteRef };
/**
* Components to be forwarded to the `components` option of `createApp`.
*/
components?: Partial<AppComponents>;
};
function isExternalRouteRef(
@@ -137,6 +143,7 @@ export function createTestAppWrapper(
Router: ({ children }) => (
<MemoryRouter initialEntries={routeEntries} children={children} />
),
...options.components,
},
icons: mockIcons,
plugins: [],