chore: removing mode from other fixtures

Signed-off-by: benjdlambert <ben@blam.sh>
This commit is contained in:
benjdlambert
2025-08-04 16:58:39 +02:00
parent eeade86c09
commit e3c320a514
4 changed files with 9 additions and 10 deletions
@@ -18,9 +18,9 @@ import { createComponentRef } from '@backstage/frontend-plugin-api';
import { DefaultComponentsApi } from './DefaultComponentsApi';
import { render, screen } from '@testing-library/react';
const testRefA = createComponentRef({ id: 'test.a', mode: 'sync' });
const testRefB1 = createComponentRef({ id: 'test.b', mode: 'sync' });
const testRefB2 = createComponentRef({ id: 'test.b', mode: 'sync' });
const testRefA = createComponentRef({ id: 'test.a' });
const testRefB1 = createComponentRef({ id: 'test.b' });
const testRefB2 = createComponentRef({ id: 'test.b' });
describe('DefaultComponentsApi', () => {
it('should provide components', () => {
@@ -44,10 +44,10 @@ export const ComponentImplementationBlueprint = createExtensionBlueprint({
}) {
return createExtensionBlueprintParams(params);
},
*factory(params) {
yield componentDataRef({
factory: params => [
componentDataRef({
ref: params.ref,
loader: params.loader,
});
},
}),
],
});
@@ -23,19 +23,16 @@ import { createComponentRef } from './createComponentRef';
const coreProgressComponentRef = createComponentRef<CoreProgressProps>({
id: 'core.components.progress',
mode: 'sync',
});
const coreNotFoundErrorPageComponentRef =
createComponentRef<CoreNotFoundErrorPageProps>({
id: 'core.components.notFoundErrorPage',
mode: 'sync',
});
const coreErrorBoundaryFallbackComponentRef =
createComponentRef<CoreErrorBoundaryFallbackProps>({
id: 'core.components.errorBoundaryFallback',
mode: 'sync',
});
/** @public */
@@ -32,6 +32,8 @@ export function makeComponentFromRef<
);
const ComponentRefImpl = (props: ExternalComponentProps) => {
// todo(blam): use the component that's in the API ref instead if it's defined.
// otherwise use the fallback..
const api = useApi(componentsApiRef);
const innerProps = options.transformProps?.(props) ?? props;