Skip to content

Commit ba92b96

Browse files
feat(scaffolder-and-catalog-import): Rename Register an existing component to Import an existing Git repository (#2930)
* feat(scaffolder-and-catalog-import): Rename to Signed-off-by: its-mitesh-kumar <[email protected]> * updating e2e Signed-off-by: its-mitesh-kumar <[email protected]> --------- Signed-off-by: its-mitesh-kumar <[email protected]>
1 parent 5f37447 commit ba92b96

File tree

12 files changed

+64
-14
lines changed

12 files changed

+64
-14
lines changed

e2e-tests/playwright/e2e/audit-log/auditor-catalog.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ test.describe.serial("Audit Log check for Catalog Plugin", () => {
4343
test("Should fetch logs for entity-mutate event and validate log structure and values", async () => {
4444
// Ensure the entity exists
4545
await ensureEntityExists();
46-
await uiHelper.clickButton("Register Existing Component");
46+
await uiHelper.clickButton("Import an existing Git repository");
4747
// Register as existing (should trigger entity-mutate)
4848
await catalogImport.registerExistingComponent(template, false);
4949
await LogUtils.validateLogEvent(
@@ -61,7 +61,7 @@ test.describe.serial("Audit Log check for Catalog Plugin", () => {
6161

6262
test("Should fetch logs for location-mutate event and validate log structure and values", async () => {
6363
await ensureEntityDoesNotExist();
64-
await uiHelper.clickButton("Register Existing Component");
64+
await uiHelper.clickButton("Import an existing Git repository");
6565
// Register as new (should trigger location-mutate)
6666
await catalogImport.registerExistingComponent(template, false);
6767
await LogUtils.validateLogEvent(

e2e-tests/playwright/e2e/catalog-scaffolded-from-link.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ test.describe.serial("Link Scaffolded Templates to Catalog Items", () => {
4747
await runAccessibilityTests(page, testInfo);
4848

4949
await uiHelper.clickButton("Self-service");
50-
await uiHelper.clickButton("Register Existing Component");
50+
await uiHelper.clickButton("Import an existing Git repository");
5151
await catalogImport.registerExistingComponent(template, false);
5252
});
5353

e2e-tests/playwright/e2e/catalog-timestamp.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ test.describe("Test timestamp column on Catalog", () => {
3030
await uiHelper.openCatalogSidebar("Component");
3131
});
3232

33-
test("Register an existing component and verify `Created At` column and value in the Catalog Page", async () => {
33+
test("Import an existing Git repository and verify `Created At` column and value in the Catalog Page", async () => {
3434
await uiHelper.clickButton("Self-service");
35-
await uiHelper.clickButton("Register Existing Component");
35+
await uiHelper.clickButton("Import an existing Git repository");
3636
await catalogImport.registerExistingComponent(component);
3737
await uiHelper.openCatalogSidebar("Component");
3838
await uiHelper.searchInputPlaceholder("timestamp-test-created");

e2e-tests/playwright/e2e/github-happy-path.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ test.describe("GitHub Happy path", async () => {
5050
await uiHelper.verifyHeading(`User Entity: ${process.env.GH_USER2_ID}`);
5151
});
5252

53-
test("Register an existing component", async () => {
53+
test("Import an existing Git repository", async () => {
5454
await uiHelper.openSidebar("Catalog");
5555
await uiHelper.selectMuiBox("Kind", "Component");
5656
await uiHelper.clickButton("Self-service");
57-
await uiHelper.clickButton("Register Existing Component");
57+
await uiHelper.clickButton("Import an existing Git repository");
5858
await catalogImport.registerExistingComponent(component);
5959
});
6060

e2e-tests/playwright/e2e/plugins/bulk-import.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,11 @@ test.describe
270270
]);
271271
});
272272

273-
test('Verify repo from "register existing component" are displayed in bulk import Added repositories', async () => {
274-
// Register Existing Component
273+
test('Verify repo from "import an existing git repository" are displayed in bulk import Added repositories', async () => {
274+
// Import an existing Git repository
275275
await uiHelper.openSidebar("Catalog");
276276
await uiHelper.clickButton("Self-service");
277-
await uiHelper.clickButton("Register Existing Component");
277+
await uiHelper.clickButton("Import an existing Git repository");
278278
await catalogImport.registerExistingComponent(
279279
existingComponentDetails.url,
280280
true,

e2e-tests/playwright/e2e/plugins/http-request.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ test.describe("Testing scaffolder-backend-module-http-request to invoke an exter
2626
test.setTimeout(130000);
2727
await uiHelper.clickLink({ ariaLabel: "Self-service" });
2828
await uiHelper.verifyHeading("Templates");
29-
await uiHelper.clickButton("Register Existing Component");
29+
await uiHelper.clickButton("Import an existing Git repository");
3030
await catalogImport.registerExistingComponent(template, false);
3131

3232
await uiHelper.openSidebar("Catalog");

e2e-tests/playwright/e2e/plugins/rbac/rbac.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,8 @@ test.describe.serial("Test RBAC", () => {
564564
await page.reload();
565565
await uiHelper.openSidebar("Catalog");
566566
await uiHelper.clickButton("Self-service");
567-
expect(await uiHelper.isLinkVisible("Register Existing Component"));
568-
await uiHelper.clickButton("Register Existing Component");
567+
expect(await uiHelper.isLinkVisible("Import an existing Git repository"));
568+
await uiHelper.clickButton("Import an existing Git repository");
569569
const catalogImport = new CatalogImport(page);
570570
const component =
571571
"https://github.com/janus-qe/custom-catalog-entities/blob/main/timestamp-catalog-info.yaml";

packages/app/src/components/DynamicRoot/DynamicRoot.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ import DynamicRootContext, {
3232
import { AppsConfig } from '@scalprum/core';
3333
import { useScalprum } from '@scalprum/react-core';
3434

35+
import { catalogImportTranslations } from '../../translations/catalog-import/catalog-import';
36+
import { scaffolderTranslations } from '../../translations/scaffolder/scaffolder';
3537
import bindAppRoutes from '../../utils/dynamicUI/bindAppRoutes';
3638
import extractDynamicConfig, {
3739
configIfToCallable,
@@ -535,7 +537,11 @@ export const DynamicRoot = ({
535537
app.current = createApp({
536538
__experimentalTranslations: {
537539
availableLanguages: ['en'],
538-
resources: [catalogTranslations],
540+
resources: [
541+
catalogTranslations,
542+
scaffolderTranslations,
543+
catalogImportTranslations,
544+
],
539545
},
540546
apis: [...filteredStaticApis, ...remoteApis, ...multipleAnalyticsApi],
541547
bindRoutes({ bind }) {
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { createTranslationMessages } from '@backstage/core-plugin-api/alpha';
2+
import { catalogImportTranslationRef } from '@backstage/plugin-catalog-import/alpha';
3+
4+
const en = createTranslationMessages({
5+
ref: catalogImportTranslationRef,
6+
full: false, // False means that this is a partial translation
7+
messages: {
8+
'defaultImportPage.headerTitle': 'Import an existing Git repository',
9+
'importInfoCard.title': 'Import an existing Git repository',
10+
},
11+
});
12+
13+
export default en;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { createTranslationResource } from '@backstage/core-plugin-api/alpha';
2+
import { catalogImportTranslationRef } from '@backstage/plugin-catalog-import/alpha';
3+
4+
export const catalogImportTranslations = createTranslationResource({
5+
ref: catalogImportTranslationRef,
6+
translations: {
7+
en: () => import('./catalog-import-en'),
8+
},
9+
});

0 commit comments

Comments
 (0)