test and review fixes

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2026-01-23 11:46:20 +01:00
parent f73d947c85
commit 409af724bf
6 changed files with 33 additions and 14 deletions
@@ -20,6 +20,7 @@ import {
coreExtensionData,
createExtension,
createExtensionInput,
createFrontendModule,
} from '@backstage/frontend-plugin-api';
import { renderTestApp } from '@backstage/frontend-test-utils';
@@ -63,7 +64,11 @@ describe('AppRootWrapperBlueprint', () => {
},
});
renderTestApp({ extensions: [extension] });
renderTestApp({
features: [
createFrontendModule({ pluginId: 'app', extensions: [extension] }),
],
});
await waitFor(() => expect(screen.getByText('Hello')).toBeInTheDocument());
});
@@ -95,20 +100,28 @@ describe('AppRootWrapperBlueprint', () => {
});
renderTestApp({
extensions: [
extension,
createExtension({
name: 'test-child',
attachTo: { id: 'app-root-wrapper:test', input: 'children' },
output: [coreExtensionData.reactElement],
factory: () => [coreExtensionData.reactElement(<div>Its Me</div>)],
extensions: [],
features: [
createFrontendModule({
pluginId: 'app',
extensions: [
extension,
createExtension({
name: 'test-child',
attachTo: extension.inputs.children,
output: [coreExtensionData.reactElement],
factory: () => [
coreExtensionData.reactElement(<div>Its Me</div>),
],
}),
],
}),
],
config: {
app: {
extensions: [
{
'app-root-wrapper:test': { config: { name: 'Robin' } },
'app-root-wrapper:app': { config: { name: 'Robin' } },
},
],
},