Add catalog API report and fix test cases.

Signed-off-by: Aramis Sennyey <sennyeya@amazon.com>
This commit is contained in:
Aramis Sennyey
2023-02-13 13:53:02 -05:00
committed by Fredrik Adelöw
parent 8b7a55b55d
commit 6bd5cade39
3 changed files with 20 additions and 2 deletions
+9
View File
@@ -453,6 +453,15 @@ export function getEntitySourceLocation(
scmIntegrationsApi: ScmIntegrationRegistry,
): EntitySourceLocation | undefined;
// @public
export function humanizeEntity(
entity: Entity,
opts?: {
defaultKind?: string;
defaultNamespace?: string | false;
},
): string;
// @public (undocumented)
export function humanizeEntityRef(
entityRef: Entity | CompoundEntityRef,
@@ -75,9 +75,11 @@ export function humanizeEntityRef(
*
* If neither of those are found or populated, fallback to `humanizeEntityRef`.
*
* @param entity Entity to convert.
* @param opts If entity readable name is not available, opts will be used to specify humanizeEntityRef options.
* @param entity - Entity to convert.
* @param opts - If entity readable name is not available, opts will be used to specify humanizeEntityRef options.
* @returns Readable name, defaults to unique identifier.
*
* @public
*/
export function humanizeEntity(
entity: Entity,
@@ -119,6 +119,13 @@ describe('DefaultCatalogPage', () => {
],
};
},
/**
* For the purposes of this test case, use existing functionality. The picker
* isn't being tested, just needs this method to render correctly.
*/
getEntitiesByRefs: async refs => {
return { items: refs.entityRefs.map(() => undefined) };
},
};
const testProfile: Partial<ProfileInfo> = {
displayName: 'Display Name',