Skip to content

Commit 9b7182d

Browse files
authored
fix(e2e): localization tests nightly fixes (#4315)
* bugs fixed * added fixes and new bug * key fixes
1 parent 37a5203 commit 9b7182d

File tree

9 files changed

+48
-26
lines changed

9 files changed

+48
-26
lines changed

e2e-tests/playwright/e2e/default-global-header.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ test.describe("Default Global Header", () => {
3939
),
4040
).toBeVisible();
4141
await uiHelper.verifyLink({
42-
// TODO: RHDHBUGS-2564 - String not getting translated
43-
// label: t["rhdh"][lang]["menuItem.selfService"],
4442
label: "Self-service",
4543
});
4644

e2e-tests/playwright/e2e/extensions.spec.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ test.describe("Admin > Extensions", () => {
4444
uiHelper = new UIhelper(page);
4545
await new Common(page).loginAsKeycloakUser();
4646
await uiHelper.openSidebarButton(
47-
// TODO: RHDHBUGS-2584 - Administration sidebar menu not translating
48-
// label: t["rhdh"][lang]["menuItem.administration"],
49-
"Administration",
47+
t["rhdh"][lang]["menuItem.administration"],
5048
);
51-
await uiHelper.openSidebar(t["plugin.extensions"][lang]["header.title"]);
49+
// TODO: https://issues.redhat.com/browse/RHDHBUGS-2782
50+
// await uiHelper.openSidebar(t["plugin.extensions"][lang]["header.title"]);
51+
await uiHelper.openSidebar("Extensions");
5252
await uiHelper.verifyHeading(
5353
t["plugin.extensions"][lang]["header.extensions"],
5454
);
@@ -476,7 +476,9 @@ test.describe("Admin > Extensions", () => {
476476

477477
// Wait specifically for the Actions cell (5th cell / last cell) to be rendered
478478
const actionsCell = techdocsRow.getByLabel(
479-
"Package cannot be managed in the production environment",
479+
t["plugin.extensions"][lang][
480+
"installedPackages.table.tooltips.packageProductionDisabled"
481+
],
480482
);
481483
await expect(actionsCell).toHaveCount(3);
482484
for (const button of await actionsCell.all()) {
@@ -485,22 +487,22 @@ test.describe("Admin > Extensions", () => {
485487
await page
486488
.getByRole("button", {
487489
name: new RegExp(
488-
`Rows per page: 5 ${t["plugin.extensions"][lang]["table.pagination.rows"]}`,
490+
`Rows per page: ${t["plugin.extensions"][lang]["table.pagination.rows5"]}`,
489491
),
490492
})
491493
.click();
492494
await page.getByRole("option", { name: "10", exact: true }).click();
493495
await page
494496
.getByRole("button", {
495497
name: new RegExp(
496-
`Rows per page: 10 ${t["plugin.extensions"][lang]["table.pagination.rows"]}`,
498+
`Rows per page: ${t["plugin.extensions"][lang]["table.pagination.rows10"]}`,
497499
),
498500
})
499501
.scrollIntoViewIfNeeded();
500502
await expect(
501503
page.getByRole("button", {
502504
name: new RegExp(
503-
`Rows per page: 10 ${t["plugin.extensions"][lang]["table.pagination.rows"]}`,
505+
`Rows per page: ${t["plugin.extensions"][lang]["table.pagination.rows10"]}`,
504506
),
505507
}),
506508
).toBeVisible();

e2e-tests/playwright/e2e/plugins/frontend/sidebar.spec.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,14 @@ test.describe("Validate Sidebar Navigation Customization", () => {
4545

4646
// Open the 'Favorites' menu and navigate to 'Docs'
4747
await uiHelper.openSidebarButton("Favorites");
48-
await uiHelper.openSidebar(t["rhdh"][lang]["menuItem.docs"]);
48+
// TODO: https://issues.redhat.com/browse/RHDHBUGS-2720 - Documentation sidebar menu not translating
49+
// await uiHelper.openSidebar(t["rhdh"][lang]["menuItem.docs"]);
50+
await uiHelper.openSidebar("Docs");
4951

5052
// Verify if the Documentation page has loaded
51-
await uiHelper.verifyHeading("Documentation");
52-
await uiHelper.verifyText("Documentation available in", false);
53+
// TODO: https://issues.redhat.com/browse/RHDHBUGS-2720 - Documentation sidebar menu not translating
54+
// await uiHelper.verifyHeading("Documentation");
55+
// await uiHelper.verifyText("Documentation available in", false);
5356

5457
// Verify the presense/absense of the 'Test' buttons in the sidebar
5558
await uiHelper.verifyText("Test enabled");

e2e-tests/playwright/utils/ui-helper.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,10 @@ export class UIhelper {
262262
}
263263

264264
async goToSelfServicePage() {
265-
// TODO: RHDHBUGS-2564 - String not getting translated
266-
// t["rhdh"][lang]["menuItem.selfService"]
267-
await this.clickLink({ ariaLabel: "Self-service" });
268-
await this.verifyHeading("Self-service");
265+
await this.clickLink({
266+
ariaLabel: "Self-service",
267+
});
268+
await this.verifyHeading(t["rhdh"][lang]["menuItem.selfService"]);
269269
}
270270

271271
async verifyLink(

translations/test/all-v1.8_s3281-en.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,11 @@
358358
"button.save": "Save",
359359
"button.close": "Close",
360360
"button.viewAll": "View all plugins",
361-
"table.pagination.rows": "rows",
361+
"table.pagination.rows5": "5 rows",
362+
"table.pagination.rows10": "10 rows",
363+
"table.pagination.rows20": "20 rows",
364+
"table.pagination.rows50": "50 rows",
365+
"table.pagination.rows100": "100 rows",
362366
"button.viewDocumentation": "View documentation",
363367
"button.viewInstalledPlugins": "View installed plugins ({{count}})",
364368
"button.restart": "Restart required",
@@ -458,6 +462,7 @@
458462
"installedPackages.table.tooltips.downloadPackage": "Download package configuration",
459463
"installedPackages.table.tooltips.enablePackage": "Enable package",
460464
"installedPackages.table.tooltips.disablePackage": "Disable package",
465+
"installedPackages.table.tooltips.packageProductionDisabled": "Package cannot be managed in the production environment.",
461466
"installedPackages.table.emptyMessages.noResults": "No results found. Try a different search term.",
462467
"installedPackages.table.emptyMessages.noRecords": "No records to display",
463468
"actions.install": "Install",

translations/test/rhdh-fr.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@
4747
"signIn.providers.onelogin.message": "Connectez-vous avec OneLogin",
4848
"signIn.providers.saml.title": "SAML",
4949
"signIn.providers.saml.message": "Connectez-vous en utilisant SAML",
50-
"catalog.entityPage.overview.title": "Vue densemble",
50+
"catalog.entityPage.overview.title": "Vue d'ensemble",
5151
"catalog.entityPage.topology.title": "Topologie",
5252
"catalog.entityPage.issues.title": "Problèmes",
5353
"catalog.entityPage.pullRequests.title": "Extraire/Merger les Demandes",
5454
"catalog.entityPage.ci.title": "CI",
5555
"catalog.entityPage.cd.title": "CD",
5656
"catalog.entityPage.kubernetes.title": "Kubernetes",
57-
"catalog.entityPage.imageRegistry.title": "Registre dimages",
57+
"catalog.entityPage.imageRegistry.title": "Registre d'images",
5858
"catalog.entityPage.monitoring.title": "Surveillance",
5959
"catalog.entityPage.lighthouse.title": "Lighthouse",
6060
"catalog.entityPage.api.title": "API",

translations/test/rhdh-plugins-fr.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,11 @@
183183
"table.headers.lastUpdated": "Dernière mise à jour",
184184
"table.headers.actions": "Actes",
185185
"table.headers.catalogInfoYaml": "catalogue-info.yaml",
186-
"table.pagination.rows5": "5 lignes",
187-
"table.pagination.rows10": "10 lignes",
188-
"table.pagination.rows20": "20 lignes",
189-
"table.pagination.rows50": "50 lignes",
190-
"table.pagination.rows100": "100 lignes",
186+
"table.pagination.rows5": "5 rangées",
187+
"table.pagination.rows10": "10 rangées",
188+
"table.pagination.rows20": "20 rangées",
189+
"table.pagination.rows50": "50 rangées",
190+
"table.pagination.rows100": "100 rangées",
191191
"steps.chooseApprovalTool": "Choisissez l'outil d'approbation (GitHub/GitLab) pour la création de PR",
192192
"steps.chooseRepositories": "Choisissez les référentiels que vous souhaitez ajouter",
193193
"steps.chooseItems": "Choisissez les éléments que vous souhaitez importer",
@@ -539,6 +539,11 @@
539539
"button.save": "Sauvegarder",
540540
"button.close": "Fermer",
541541
"button.viewAll": "Voir tous les plugins",
542+
"table.pagination.rows5": "5 rangées",
543+
"table.pagination.rows10": "10 rangées",
544+
"table.pagination.rows20": "20 rangées",
545+
"table.pagination.rows50": "50 rangées",
546+
"table.pagination.rows100": "100 rangées",
542547
"button.viewDocumentation": "Voir la documentation",
543548
"button.viewInstalledPlugins": "Afficher les plugins installés ({{count}})",
544549
"button.restart": "Redémarrage requis",
@@ -616,7 +621,6 @@
616621
"package.notAvailable": "Paquet {{name}} non disponible",
617622
"package.ensureCatalogEntity": "Veillez à ce que l’entité de catalogue existe pour ce paquet.",
618623
"package.tags": "Mots-clés",
619-
"table.pagination.rows": "rangées",
620624
"table.packageName": "Nom du paquet",
621625
"table.version": "Version",
622626
"table.role": "Rôle",

translations/test/rhdh-plugins-it.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,11 @@
539539
"button.save": "Salva",
540540
"button.close": "Chiudi",
541541
"button.viewAll": "Visualizza tutti i plugin",
542+
"table.pagination.rows5": "5 righe",
543+
"table.pagination.rows10": "10 righe",
544+
"table.pagination.rows20": "20 righe",
545+
"table.pagination.rows50": "50 righe",
546+
"table.pagination.rows100": "100 righe",
542547
"button.viewDocumentation": "Visualizza la documentazione",
543548
"button.viewInstalledPlugins": "Visualizza i plugin installati ({{count}})",
544549
"button.restart": "È necessario riavviare",

translations/test/rhdh-plugins-ja.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,11 @@
539539
"button.save": "保存",
540540
"button.close": "閉じる",
541541
"button.viewAll": "すべてのプラグインの表示",
542+
"table.pagination.rows5": "5 行",
543+
"table.pagination.rows10": "10 行",
544+
"table.pagination.rows20": "20 行",
545+
"table.pagination.rows50": "50 行",
546+
"table.pagination.rows100": "100 行",
542547
"button.viewDocumentation": "ドキュメントの表示",
543548
"button.viewInstalledPlugins": "インストール済みプラグインの表示 ({{count}})",
544549
"button.restart": "再起動が必要です",

0 commit comments

Comments
 (0)