diff --git a/plugins/catalog-react/src/alpha/converters/convertLegacyEntityCardExtension.test.tsx b/plugins/catalog-react/src/alpha/converters/convertLegacyEntityCardExtension.test.tsx index 9e97412f92..fc7bed6281 100644 --- a/plugins/catalog-react/src/alpha/converters/convertLegacyEntityCardExtension.test.tsx +++ b/plugins/catalog-react/src/alpha/converters/convertLegacyEntityCardExtension.test.tsx @@ -26,7 +26,7 @@ import { import { screen } from '@testing-library/react'; import { convertLegacyEntityCardExtension } from './convertLegacyEntityCardExtension'; import { convertLegacyRouteRef } from '@backstage/core-compat-api'; -import { EntityContentBlueprint } from '../blueprints'; +import { EntityCardBlueprint } from '../blueprints'; const routeRef = createLegacyRouteRef({ id: 'test' }); const legacyPlugin = createLegacyPlugin({ @@ -60,12 +60,14 @@ describe('convertLegacyEntityCardExtension', () => { await expect(screen.findByText('Hello')).resolves.toBeInTheDocument(); - expect(tester.get(EntityContentBlueprint.dataRefs.filterExpression)).toBe( + expect(tester.get(EntityCardBlueprint.dataRefs.filterExpression)).toBe( undefined, ); - expect(tester.get(EntityContentBlueprint.dataRefs.filterFunction)).toBe( + expect(tester.get(EntityCardBlueprint.dataRefs.filterFunction)).toBe( undefined, ); + + expect(tester.get(EntityCardBlueprint.dataRefs.type)).toBe(undefined); }); it('should convert an entity card extension with overrides', async () => { @@ -94,10 +96,10 @@ describe('convertLegacyEntityCardExtension', () => { await expect(screen.findByText('Hello')).resolves.toBeInTheDocument(); - expect(tester.get(EntityContentBlueprint.dataRefs.filterExpression)).toBe( + expect(tester.get(EntityCardBlueprint.dataRefs.filterExpression)).toBe( 'my-filter', ); - expect(tester.get(EntityContentBlueprint.dataRefs.filterFunction)).toBe( + expect(tester.get(EntityCardBlueprint.dataRefs.filterFunction)).toBe( undefined, ); }); @@ -123,4 +125,32 @@ describe('convertLegacyEntityCardExtension', () => { expect(getDiscoveredId('EntityExAmpleCard')).toBe('entity-card:ex-ample'); expect(getDiscoveredId('ExampleCard')).toBe('entity-card:example-card'); }); + + it('should support the type override', async () => { + const LegacyExtension = legacyPlugin.provide( + createRoutableExtension({ + name: 'EntityExampleCard', + mountPoint: routeRef, + component: async () => () =>