diff --git a/plugins/catalog/src/components/CatalogPage/CatalogPage.test.tsx b/plugins/catalog/src/components/CatalogPage/CatalogPage.test.tsx index ec26ce5b28..9ebeb7f546 100644 --- a/plugins/catalog/src/components/CatalogPage/CatalogPage.test.tsx +++ b/plugins/catalog/src/components/CatalogPage/CatalogPage.test.tsx @@ -22,7 +22,10 @@ import { wrapInTestApp } from '@backstage/test-utils'; import { catalogApiRef } from '../..'; const errorApi = { post: () => {} }; -const catalogApi = { getEntities: () => Promise.resolve([{ kind: '' }]) }; +const catalogApi = { + getEntities: () => Promise.resolve([{ kind: '', metadata: {} }]), + getLocationByEntity: () => Promise.resolve({ data: {} }), +}; describe('CatalogPage', () => { // this test right now causes some red lines in the log output when running tests diff --git a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx index 59359fab16..015916c3f4 100644 --- a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx +++ b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx @@ -42,7 +42,7 @@ type CatalogTableProps = { titlePreamble: string; loading: boolean; error?: any; - actions: any; + actions?: any; }; const CatalogTable: FC = ({ components, diff --git a/plugins/catalog/src/data/component.ts b/plugins/catalog/src/data/component.ts index 5da962911e..d53a6387fc 100644 --- a/plugins/catalog/src/data/component.ts +++ b/plugins/catalog/src/data/component.ts @@ -17,5 +17,5 @@ export type Component = { name: string; kind: string; description: string; - location: any; + location?: any; }; diff --git a/plugins/catalog/src/data/utils.ts b/plugins/catalog/src/data/utils.ts index e54b39c7c0..645d6b845d 100644 --- a/plugins/catalog/src/data/utils.ts +++ b/plugins/catalog/src/data/utils.ts @@ -18,7 +18,7 @@ import { Entity } from '@backstage/catalog-model'; export function envelopeToComponent( envelope: Entity, - location: any, + location?: any, ): Component { return { name: envelope.metadata?.name ?? '',