feat(e2e): add German and Spanish locale support for e2e tests#2502
feat(e2e): add German and Spanish locale support for e2e tests#2502jrichter1 merged 10 commits intoredhat-developer:mainfrom
Conversation
- Add app-config-e2e-de.yaml and app-config-e2e-es.yaml per workspace - Update playwright.config to run e2e on all locales (en, de, es, fr, it, ja) - Skip tests that fail due to missing de/es translation keys; add comment to re-enable after https://issues.redhat.com/browse/RHDHBUGS-2791 This change applies to adoption-insights workspace; same pattern can be used for other workspaces with localized e2e. Made-with: Cursor
Review Summary by QodoAdd German and Spanish locale support for e2e tests
WalkthroughsDescription• Add German and Spanish locale e2e test configurations • Expand e2e test coverage to six locales (en, de, es, fr, it, ja) • Reassign port mappings to accommodate new German and Spanish configs • Skip three tests pending translation key fixes for de/es locales Diagramflowchart LR
A["E2E Test Suite"] -->|"Add de/es configs"| B["6 Locale Support"]
B -->|"Reassign ports"| C["Port Mapping Updated"]
A -->|"Skip failing tests"| D["Pending Translation Fixes"]
C -->|"en:3000, de:3001, es:3002, fr:3003, it:3004, ja:3005"| E["Playwright Config"]
File Changes1. workspaces/adoption-insights/e2e-tests/insights.test.ts
|
Code Review by Qodo
1.
|
- Add app-config-e2e-de.yaml and app-config-e2e-es.yaml - Update playwright.config to run e2e on all 6 locales (en, de, es, fr, it, ja) - Update locale yaml port mapping; use __dirname for config paths - Skip tests blocked by missing de/es translations; re-enable after RHDHBUGS-2792 Made-with: Cursor
Changed Packages
|
…ghts, bulk-import, extensions)
- Add shared skipIfLocales(testInfo, locales, reason) in each workspace utils
- Use per-test skip for de/es instead of test.skip so tests run on en, fr, it, ja
- Fix Playwright fixture: use ({}, testInfo) instead of (_, testInfo)
- No extra describe grouping; tests stay in place with one-line skip at start
Made-with: Cursor
- Add de and es projects to playwright.config.ts - Add Deutsch and Español to LOCALE_DISPLAY_NAMES in helpers for switchToLocale Made-with: Cursor
- Add de and es projects to playwright.config.ts - Add Deutsch and Español to LOCALE_DISPLAY_NAMES in globalHeaderHelper - Add skipIfLocales for de/es on tests that use create.* (missing in de/es) - Skip reason links to RHDHBUGS-2795 Made-with: Cursor
…until RHDHBUGS-2797 Made-with: Cursor
…until RHDHBUGS-2800 Made-with: Cursor
…ntil RHDHBUGS-2801 Made-with: Cursor
…ght configs Made-with: Cursor
…s, increase timeout Made-with: Cursor
1ba3d43 to
835ea1f
Compare
|



E2e: Add German (de) and Spanish (es) locale support across workspaces
This PR enables e2e tests to run on Deutsch and Español in addition to existing locales (en, fr, it, ja). Tests run on all six locales (en, de, es, fr, it, ja) where supported; for workspaces with missing de/es translations, affected tests skip only on de/es via
skipIfLocales(or the full suite in lightspeed and scorecard) until the translation Jira issues are resolved.Resolves:
https://issues.redhat.com/browse/RHIDP-12537
Workspaces updated
skipIfLocalesin e2e utilsskipIfLocalesin e2e utilsLOCALE_DISPLAY_NAMES; single frontend, locale switch in UILOCALE_DISPLAY_NAMESin helpersLOCALE_DISPLAY_NAMES;skipIfLocalesin e2e utilsLOCALE_DISPLAY_NAMESin testHelper; suite-level skip viabeforeEachLOCALE_DISPLAY_NAMESin helper;skipIfLocalesin e2e utilsLOCALE_DISPLAY_NAMESin CatalogPage;skipIfLocalesin e2e utilsLOCALES);LOCALE_DISPLAY_NAMESin testUtils; timeout 2 minChanges
LOCALESarray (e.g.['en', 'de', 'es', 'fr', 'it', 'ja']) instead of listing each locale by hand. Adding a new locale is a one-line change per workspace.LOCALE_DISPLAY_NAMES(andswitchToLocalewhere used) extended withde: 'Deutsch',es: 'Español'in each workspace that switches locale in the UI.skipIfLocales(testInfo, locales, reason)in each affected workspace’s e2e utils. Used so tests run on en, fr, it, ja and skip only on de/es with a reason that includes the Jira link.test.beforeEach(no per-test skip)—lightspeed because tests run serially and depend on each other; scorecard because metric, thresholds, and error keys are missing in de/es.beforeAll(e.g. guest login and load wait) can complete; no skip—de/es translations are complete for the keys used in tests.skipIfLocales(testInfo, ['de', 'es'], '...')at the top (or a suite-levelbeforeEach). Playwright fixture usage uses({}, testInfo)where onlytestInfois needed.Translation gaps (Jira; not fixed in this PR)
activeUsers.hour,filter.selectKind,searches.houraddRepositories.approvalTool.github,previewFile.preview,repositories.prbadgessectioncreatesection (e.g.create.title)disclaimer.withValidation,chatbox.welcome.description,user.guest,aria.chatbotSelector, conversation rename/delete confirm keyssteps.configureRbac.ctaTitle,steps.configureGit.ctaTitle,steps.managePlugins.ctaTitle,steps.learnAboutCatalog.ctaTitle,steps.exploreSelfServiceTemplates.ctaTitle,steps.findAllLearningPaths.ctaTitlemetric.*,thresholds.*,emptyState.button,errors.metricDataUnavailable,errors.noDataFoundskipIfLocalescalls (or suite-levelbeforeEachskip) can be removed and the tests will run on de/es as well.Checklist