diff --git a/packages/frontend-plugin-api/src/components/ExtensionBoundary.test.tsx b/packages/frontend-plugin-api/src/components/ExtensionBoundary.test.tsx
index 88bdcc6617..49a9f95ed2 100644
--- a/packages/frontend-plugin-api/src/components/ExtensionBoundary.test.tsx
+++ b/packages/frontend-plugin-api/src/components/ExtensionBoundary.test.tsx
@@ -34,15 +34,11 @@ const wrapInBoundaryExtension = (element: JSX.Element) => {
path: coreExtensionData.routePath,
routeRef: coreExtensionData.routeRef.optional(),
},
- factory({ source }) {
+ factory({ node }) {
return {
routeRef,
path: '/',
- element: (
-
- {element}
-
- ),
+ element: {element},
};
},
});
diff --git a/packages/frontend-plugin-api/src/extensions/createPageExtension.test.tsx b/packages/frontend-plugin-api/src/extensions/createPageExtension.test.tsx
index 81843558da..f75821944a 100644
--- a/packages/frontend-plugin-api/src/extensions/createPageExtension.test.tsx
+++ b/packages/frontend-plugin-api/src/extensions/createPageExtension.test.tsx
@@ -15,16 +15,12 @@
*/
import React from 'react';
-import { renderWithEffects, wrapInTestApp } from '@backstage/test-utils';
import { useAnalytics } from '@backstage/core-plugin-api';
import { waitFor } from '@testing-library/react';
import { PortableSchema } from '../schema';
-import {
- coreExtensionData,
- createExtensionInput,
- createPlugin,
-} from '../wiring';
+import { coreExtensionData, createExtensionInput } from '../wiring';
import { createPageExtension } from './createPageExtension';
+import { createExtensionTester } from '@backstage/frontend-test-utils';
jest.mock('@backstage/core-plugin-api', () => ({
...jest.requireActual('@backstage/core-plugin-api'),
@@ -120,19 +116,13 @@ describe('createPageExtension', () => {
captureEvent,
});
- const extension = createPageExtension({
- id: 'plugin.page',
- defaultPath: '/',
- loader: async () =>
Component
,
- });
-
- const output = extension.factory({
- source: createPlugin({ id: 'plugin ' }),
- config: { path: '/' },
- inputs: {},
- });
-
- renderWithEffects(wrapInTestApp(output.element as unknown as JSX.Element));
+ createExtensionTester(
+ createPageExtension({
+ id: 'plugin.page',
+ defaultPath: '/',
+ loader: async () => Component
,
+ }),
+ ).render();
await waitFor(() =>
expect(captureEvent).toHaveBeenCalledWith(
diff --git a/packages/frontend-plugin-api/src/extensions/createPageExtension.tsx b/packages/frontend-plugin-api/src/extensions/createPageExtension.tsx
index f5e258a1e4..99733ba367 100644
--- a/packages/frontend-plugin-api/src/extensions/createPageExtension.tsx
+++ b/packages/frontend-plugin-api/src/extensions/createPageExtension.tsx
@@ -75,7 +75,7 @@ export function createPageExtension<
path: coreExtensionData.routePath,
routeRef: coreExtensionData.routeRef.optional(),
},
- factory({ config, inputs, source }) {
+ factory({ config, inputs, node }) {
const ExtensionComponent = lazy(() =>
options
.loader({ config, inputs })
@@ -86,7 +86,7 @@ export function createPageExtension<
path: config.path,
routeRef: options.routeRef,
element: (
-
+
),
diff --git a/plugins/catalog-react/src/alpha.tsx b/plugins/catalog-react/src/alpha.tsx
index 8d0436e4be..a339816742 100644
--- a/plugins/catalog-react/src/alpha.tsx
+++ b/plugins/catalog-react/src/alpha.tsx
@@ -113,7 +113,7 @@ export function createEntityCardExtension<
.optional(),
}),
),
- factory({ config, inputs, source }) {
+ factory({ config, inputs, node }) {
const ExtensionComponent = lazy(() =>
options
.loader({ inputs })
@@ -122,7 +122,7 @@ export function createEntityCardExtension<
return {
element: (
-
+
),
@@ -179,7 +179,7 @@ export function createEntityContentExtension<
.optional(),
}),
),
- factory({ config, inputs, source }) {
+ factory({ config, inputs, node }) {
const ExtensionComponent = lazy(() =>
options
.loader({ inputs })
@@ -191,7 +191,7 @@ export function createEntityContentExtension<
title: config.title,
routeRef: options.routeRef,
element: (
-
+
),
diff --git a/plugins/catalog/src/alpha/createCatalogFilterExtension.tsx b/plugins/catalog/src/alpha/createCatalogFilterExtension.tsx
index cf3dbd318a..7dae30c1fa 100644
--- a/plugins/catalog/src/alpha/createCatalogFilterExtension.tsx
+++ b/plugins/catalog/src/alpha/createCatalogFilterExtension.tsx
@@ -43,7 +43,7 @@ export function createCatalogFilterExtension<
output: {
element: coreExtensionData.reactElement,
},
- factory({ config, source }) {
+ factory({ config, node }) {
const ExtensionComponent = lazy(() =>
options
.loader({ config })
@@ -52,7 +52,7 @@ export function createCatalogFilterExtension<
return {
element: (
-
+
),
diff --git a/plugins/search-react/src/alpha.tsx b/plugins/search-react/src/alpha.tsx
index 80e464fe4e..bb738a2b08 100644
--- a/plugins/search-react/src/alpha.tsx
+++ b/plugins/search-react/src/alpha.tsx
@@ -107,7 +107,7 @@ export function createSearchResultListItemExtension<
output: {
item: searchResultItemExtensionData,
},
- factory({ config, source }) {
+ factory({ config, node }) {
const ExtensionComponent = lazy(() =>
options
.component({ config })
@@ -118,7 +118,7 @@ export function createSearchResultListItemExtension<
item: {
predicate: options.predicate,
component: props => (
-
+