Add catalog API report and fix test cases.
Signed-off-by: Aramis Sennyey <sennyeya@amazon.com>
This commit is contained in:
committed by
Fredrik Adelöw
parent
8b7a55b55d
commit
6bd5cade39
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user