diff --git a/plugins/catalog/src/api/CatalogClient.ts b/plugins/catalog/src/api/CatalogClient.ts index 2e019982dc..429ae5f0a2 100644 --- a/plugins/catalog/src/api/CatalogClient.ts +++ b/plugins/catalog/src/api/CatalogClient.ts @@ -62,7 +62,7 @@ export class CatalogClient implements CatalogApi { const { location, entities } = await response.json(); if (!location || entities.length === 0) - throw new Error(`'Location wasn't added: ${target}`); + throw new Error(`Location wasn't added: ${target}`); return { location, diff --git a/plugins/catalog/src/api/types.ts b/plugins/catalog/src/api/types.ts index 1418ea17fa..a01270e7d8 100644 --- a/plugins/catalog/src/api/types.ts +++ b/plugins/catalog/src/api/types.ts @@ -25,8 +25,7 @@ export const catalogApiRef = createApiRef({ export interface CatalogApi { getEntities(): Promise; getEntityByName(name: string): Promise; - addLocation( - type: string, - target: string, - ): Promise<{ location: Location; entities: Entity[] }>; + addLocation(type: string, target: string): Promise; } + +export type AddLocationResponse = { location: Location; entities: Entity[] }; diff --git a/plugins/catalog/src/routes.ts b/plugins/catalog/src/routes.ts index 830dc6d48f..6498d412b8 100644 --- a/plugins/catalog/src/routes.ts +++ b/plugins/catalog/src/routes.ts @@ -14,15 +14,7 @@ * limitations under the License. */ -/* - * Hi! - * - * Note that this is an EXAMPLE Backstage backend. Please check the README. - * - * Happy hacking! - */ - - import { createRouteRef } from '@backstage/core'; +import { createRouteRef } from '@backstage/core'; const NoIcon = () => null; diff --git a/plugins/register-component/src/components/RegisterComponentResultDialog/RegisterComponentResultDialog.test.tsx b/plugins/register-component/src/components/RegisterComponentResultDialog/RegisterComponentResultDialog.test.tsx index 284e83121c..d918e72489 100644 --- a/plugins/register-component/src/components/RegisterComponentResultDialog/RegisterComponentResultDialog.test.tsx +++ b/plugins/register-component/src/components/RegisterComponentResultDialog/RegisterComponentResultDialog.test.tsx @@ -43,7 +43,7 @@ describe('RegisterComponentResultDialog', () => { it('should render', () => { const { rendered } = setup(); expect( - rendered.getByText('Component registration result'), + rendered.getByText('Component Registration Result'), ).toBeInTheDocument(); }); }); @@ -73,7 +73,9 @@ it('should show a list of components if success', async () => { }); expect( - rendered.getByText('Following components have been succefully created:'), + rendered.getByText( + 'The following components have been succefully created:', + ), ).toBeInTheDocument(); expect(rendered.getByText('Component1')).toBeInTheDocument(); expect(rendered.getByText('Component2')).toBeInTheDocument(); diff --git a/plugins/register-component/src/components/RegisterComponentResultDialog/RegisterComponentResultDialog.tsx b/plugins/register-component/src/components/RegisterComponentResultDialog/RegisterComponentResultDialog.tsx index ead7323870..4d158526a0 100644 --- a/plugins/register-component/src/components/RegisterComponentResultDialog/RegisterComponentResultDialog.tsx +++ b/plugins/register-component/src/components/RegisterComponentResultDialog/RegisterComponentResultDialog.tsx @@ -48,10 +48,10 @@ export const RegisterComponentResultDialog: FC = ({ entities, }) => ( - Component registration result + Component Registration Result - Following components have been succefully created: + The following components have been succefully created: {entities.map((entity: any, index: number) => (