diff --git a/packages/frontend-app-api/src/wiring/createApp.tsx b/packages/frontend-app-api/src/wiring/createApp.tsx index 9148ffe527..37b7d2758a 100644 --- a/packages/frontend-app-api/src/wiring/createApp.tsx +++ b/packages/frontend-app-api/src/wiring/createApp.tsx @@ -274,9 +274,7 @@ export function createSpecializedApp(options?: { config = new ConfigReader({}, 'empty-config'), } = options ?? {}; - const duplicatedFeatures = [appPlugin, ...featuresWithoutApp]; - - const features = deduplicateFeatures(duplicatedFeatures); + const features = deduplicateFeatures([appPlugin, ...featuresWithoutApp]); const tree = resolveAppTree( 'root', diff --git a/packages/frontend-plugin-api/src/blueprints/RouterBlueprint.test.tsx b/packages/frontend-plugin-api/src/blueprints/RouterBlueprint.test.tsx index 0ce21b5d6d..e8be1cc0ae 100644 --- a/packages/frontend-plugin-api/src/blueprints/RouterBlueprint.test.tsx +++ b/packages/frontend-plugin-api/src/blueprints/RouterBlueprint.test.tsx @@ -16,14 +16,17 @@ import React from 'react'; import { RouterBlueprint } from './RouterBlueprint'; import { MemoryRouter } from 'react-router-dom'; -import { waitFor } from '@testing-library/react'; +import { render, waitFor } from '@testing-library/react'; import { coreExtensionData, createExtension, createExtensionInput, } from '../wiring'; import { PageBlueprint } from './PageBlueprint'; -import { renderInTestApp } from '@backstage/frontend-test-utils'; +import { + createExtensionTester, + renderInTestApp, +} from '@backstage/frontend-test-utils'; describe('RouterBlueprint', () => { it('should return an extension when calling make with sensible defaults', () => { @@ -70,18 +73,14 @@ describe('RouterBlueprint', () => { }, }); - const { getByTestId } = renderInTestApp(
, { - extensions: [ - extension, - PageBlueprint.make({ - namespace: 'test', - params: { - defaultPath: '/', - loader: async () => , - }, - }), - ], - }); + const tester = createExtensionTester(extension); + const Component = tester.get(RouterBlueprint.dataRefs.component); + + const { getByTestId } = render( +