diff --git a/packages/test-utils/src/testUtils/appWrappers.tsx b/packages/test-utils/src/testUtils/appWrappers.tsx index 56d6e07805..05cd0b8fd4 100644 --- a/packages/test-utils/src/testUtils/appWrappers.tsx +++ b/packages/test-utils/src/testUtils/appWrappers.tsx @@ -23,8 +23,7 @@ import privateExports, { BootErrorPageProps, RouteRef, ExternalRouteRef, - createPlugin, - createRoutableExtension, + attachComponentData, } from '@backstage/core-api'; import { RenderResult } from '@testing-library/react'; import { renderWithEffects } from '@backstage/test-utils-core'; @@ -110,16 +109,10 @@ export function wrapInTestApp( Wrapper = () => Component as React.ReactElement; } - const routePlugin = createPlugin({ id: 'mock-route-plugin' }); const routeElements = Object.entries(options.mountedRoutes ?? {}).map( ([path, routeRef]) => { - const PageComponent = () =>
Mounted at {path}
; - const Page = routePlugin.provide( - createRoutableExtension({ - component: async () => PageComponent, - mountPoint: routeRef, - }), - ); + const Page = () =>
Mounted at {path}
; + attachComponentData(Page, 'core.mountPoint', routeRef); return } />; }, );