Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/pipelines/jobs/ocp-nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ run_sanity_plugins_check() {

run_localization_tests() {
local url="https://${RELEASE_NAME}-developer-hub-${NAME_SPACE}.${K8S_CLUSTER_ROUTER_BASE}"
local locales=("FR" "IT" "JA")
local locales=("DE" "ES" "FR" "IT" "JA")

log::section "Running localization tests"
# Loop through all locales - uses project name as artifacts_subdir to avoid overwriting test artifacts
Expand Down
3 changes: 2 additions & 1 deletion .ci/pipelines/resources/config_map/app-config-rhdh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,9 @@ userSettings:
i18n:
locales:
- en
- de
- es
- fr
- it
- ja
- de
defaultLocale: en
10 changes: 8 additions & 2 deletions .claude/memories/ci-e2e-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ test.beforeAll(async ({ }, testInfo) => {
- `showcase-runtime`: Runtime environment tests
- `showcase-sanity-plugins`: Plugin sanity checks
- `showcase-upgrade`: Upgrade scenario tests
- `showcase-localization-de`: German localization tests
- `showcase-localization-es`: Spanish localization tests
- `showcase-localization-fr`: French localization tests
- `showcase-localization-it`: Italian localization tests
- `showcase-localization-ja`: Japanese localization tests
Expand Down Expand Up @@ -115,9 +117,9 @@ test.beforeAll(async ({ }, testInfo) => {

7. **Localization Tests** (`playwright/e2e/localization/`)
- Verify UI displays correctly translated strings
- Supports **French (fr)**, **Italian (it)**, and **Japanese (ja)**
- Supports **German (de)**, **Spanish (es)**, **French (fr)**, **Italian (it)**, and **Japanese (ja)**
- Runs as part of OCP nightly job (skipped for OSD-GCP)
- Uses `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` Playwright projects
- Uses `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` Playwright projects
- Translation files located in `translations/` directory
- Test helper: `e2e-tests/playwright/e2e/localization/locale.ts`

Expand Down Expand Up @@ -167,6 +169,8 @@ yarn showcase-auth-providers # Auth provider tests
yarn showcase-sanity-plugins # Plugin sanity tests

# Localization tests
yarn showcase-localization-de # German localization tests
yarn showcase-localization-es # Spanish localization tests
yarn showcase-localization-fr # French localization tests
yarn showcase-localization-it # Italian localization tests
yarn showcase-localization-ja # Japanese localization tests
Expand Down Expand Up @@ -512,6 +516,8 @@ The choice of config map depends on the **Playwright test project** being execut
- `showcase-runtime` - Runtime environment tests
- `showcase-sanity-plugins` - Plugin sanity tests
- `showcase-upgrade` - Upgrade scenario tests
- `showcase-localization-de` - German localization tests
- `showcase-localization-es` - Spanish localization tests
- `showcase-localization-fr` - French localization tests
- `showcase-localization-it` - Italian localization tests
- `showcase-localization-ja` - Japanese localization tests
Expand Down
10 changes: 8 additions & 2 deletions .claude/rules/ci-e2e-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ test.beforeAll(async ({ }, testInfo) => {
- `showcase-runtime`: Runtime environment tests
- `showcase-sanity-plugins`: Plugin sanity checks
- `showcase-upgrade`: Upgrade scenario tests
- `showcase-localization-de`: German localization tests
- `showcase-localization-es`: Spanish localization tests
- `showcase-localization-fr`: French localization tests
- `showcase-localization-it`: Italian localization tests
- `showcase-localization-ja`: Japanese localization tests
Expand Down Expand Up @@ -115,9 +117,9 @@ test.beforeAll(async ({ }, testInfo) => {

7. **Localization Tests** (`playwright/e2e/localization/`)
- Verify UI displays correctly translated strings
- Supports **French (fr)**, **Italian (it)**, and **Japanese (ja)**
- Supports **German (de)**, **Spanish (es)**, **French (fr)**, **Italian (it)**, and **Japanese (ja)**
- Runs as part of OCP nightly job (skipped for OSD-GCP)
- Uses `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` Playwright projects
- Uses `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` Playwright projects
- Translation files located in `translations/` directory
- Test helper: `e2e-tests/playwright/e2e/localization/locale.ts`

Expand Down Expand Up @@ -167,6 +169,8 @@ yarn showcase-auth-providers # Auth provider tests
yarn showcase-sanity-plugins # Plugin sanity tests

# Localization tests
yarn showcase-localization-de # German localization tests
yarn showcase-localization-es # Spanish localization tests
yarn showcase-localization-fr # French localization tests
yarn showcase-localization-it # Italian localization tests
yarn showcase-localization-ja # Japanese localization tests
Expand Down Expand Up @@ -512,6 +516,8 @@ The choice of config map depends on the **Playwright test project** being execut
- `showcase-runtime` - Runtime environment tests
- `showcase-sanity-plugins` - Plugin sanity tests
- `showcase-upgrade` - Upgrade scenario tests
- `showcase-localization-de` - German localization tests
- `showcase-localization-es` - Spanish localization tests
- `showcase-localization-fr` - French localization tests
- `showcase-localization-it` - Italian localization tests
- `showcase-localization-ja` - Japanese localization tests
Expand Down
10 changes: 8 additions & 2 deletions .cursor/rules/ci-e2e-testing.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ test.beforeAll(async ({ }, testInfo) => {
- `showcase-runtime`: Runtime environment tests
- `showcase-sanity-plugins`: Plugin sanity checks
- `showcase-upgrade`: Upgrade scenario tests
- `showcase-localization-de`: German localization tests
- `showcase-localization-es`: Spanish localization tests
- `showcase-localization-fr`: French localization tests
- `showcase-localization-it`: Italian localization tests
- `showcase-localization-ja`: Japanese localization tests
Expand Down Expand Up @@ -118,9 +120,9 @@ test.beforeAll(async ({ }, testInfo) => {

7. **Localization Tests** (`playwright/e2e/localization/`)
- Verify UI displays correctly translated strings
- Supports **French (fr)**, **Italian (it)**, and **Japanese (ja)**
- Supports **German (de)**, **Spanish (es)**, **French (fr)**, **Italian (it)**, and **Japanese (ja)**
- Runs as part of OCP nightly job (skipped for OSD-GCP)
- Uses `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` Playwright projects
- Uses `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` Playwright projects
- Translation files located in `translations/` directory
- Test helper: `e2e-tests/playwright/e2e/localization/locale.ts`

Expand Down Expand Up @@ -170,6 +172,8 @@ yarn showcase-auth-providers # Auth provider tests
yarn showcase-sanity-plugins # Plugin sanity tests

# Localization tests
yarn showcase-localization-de # German localization tests
yarn showcase-localization-es # Spanish localization tests
yarn showcase-localization-fr # French localization tests
yarn showcase-localization-it # Italian localization tests
yarn showcase-localization-ja # Japanese localization tests
Expand Down Expand Up @@ -515,6 +519,8 @@ The choice of config map depends on the **Playwright test project** being execut
- `showcase-runtime` - Runtime environment tests
- `showcase-sanity-plugins` - Plugin sanity tests
- `showcase-upgrade` - Upgrade scenario tests
- `showcase-localization-de` - German localization tests
- `showcase-localization-es` - Spanish localization tests
- `showcase-localization-fr` - French localization tests
- `showcase-localization-it` - Italian localization tests
- `showcase-localization-ja` - Japanese localization tests
Expand Down
10 changes: 8 additions & 2 deletions .opencode/memories/ci-e2e-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ test.beforeAll(async ({ }, testInfo) => {
- `showcase-runtime`: Runtime environment tests
- `showcase-sanity-plugins`: Plugin sanity checks
- `showcase-upgrade`: Upgrade scenario tests
- `showcase-localization-de`: German localization tests
- `showcase-localization-es`: Spanish localization tests
- `showcase-localization-fr`: French localization tests
- `showcase-localization-it`: Italian localization tests
- `showcase-localization-ja`: Japanese localization tests
Expand Down Expand Up @@ -115,9 +117,9 @@ test.beforeAll(async ({ }, testInfo) => {

7. **Localization Tests** (`playwright/e2e/localization/`)
- Verify UI displays correctly translated strings
- Supports **French (fr)**, **Italian (it)**, and **Japanese (ja)**
- Supports **German (de)**, **Spanish (es)**, **French (fr)**, **Italian (it)**, and **Japanese (ja)**
- Runs as part of OCP nightly job (skipped for OSD-GCP)
- Uses `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` Playwright projects
- Uses `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` Playwright projects
- Translation files located in `translations/` directory
- Test helper: `e2e-tests/playwright/e2e/localization/locale.ts`

Expand Down Expand Up @@ -167,6 +169,8 @@ yarn showcase-auth-providers # Auth provider tests
yarn showcase-sanity-plugins # Plugin sanity tests

# Localization tests
yarn showcase-localization-de # German localization tests
yarn showcase-localization-es # Spanish localization tests
yarn showcase-localization-fr # French localization tests
yarn showcase-localization-it # Italian localization tests
yarn showcase-localization-ja # Japanese localization tests
Expand Down Expand Up @@ -512,6 +516,8 @@ The choice of config map depends on the **Playwright test project** being execut
- `showcase-runtime` - Runtime environment tests
- `showcase-sanity-plugins` - Plugin sanity tests
- `showcase-upgrade` - Upgrade scenario tests
- `showcase-localization-de` - German localization tests
- `showcase-localization-es` - Spanish localization tests
- `showcase-localization-fr` - French localization tests
- `showcase-localization-it` - Italian localization tests
- `showcase-localization-ja` - Japanese localization tests
Expand Down
10 changes: 8 additions & 2 deletions .rulesync/rules/ci-e2e-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ test.beforeAll(async ({ }, testInfo) => {
- `showcase-runtime`: Runtime environment tests
- `showcase-sanity-plugins`: Plugin sanity checks
- `showcase-upgrade`: Upgrade scenario tests
- `showcase-localization-de`: German localization tests
- `showcase-localization-es`: Spanish localization tests
- `showcase-localization-fr`: French localization tests
- `showcase-localization-it`: Italian localization tests
- `showcase-localization-ja`: Japanese localization tests
Expand Down Expand Up @@ -121,9 +123,9 @@ test.beforeAll(async ({ }, testInfo) => {

7. **Localization Tests** (`playwright/e2e/localization/`)
- Verify UI displays correctly translated strings
- Supports **French (fr)**, **Italian (it)**, and **Japanese (ja)**
- Supports **German (de)**, **Spanish (es)**, **French (fr)**, **Italian (it)**, and **Japanese (ja)**
- Runs as part of OCP nightly job (skipped for OSD-GCP)
- Uses `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` Playwright projects
- Uses `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` Playwright projects
- Translation files located in `translations/` directory
- Test helper: `e2e-tests/playwright/e2e/localization/locale.ts`

Expand Down Expand Up @@ -173,6 +175,8 @@ yarn showcase-auth-providers # Auth provider tests
yarn showcase-sanity-plugins # Plugin sanity tests

# Localization tests
yarn showcase-localization-de # German localization tests
yarn showcase-localization-es # Spanish localization tests
yarn showcase-localization-fr # French localization tests
yarn showcase-localization-it # Italian localization tests
yarn showcase-localization-ja # Japanese localization tests
Expand Down Expand Up @@ -518,6 +522,8 @@ The choice of config map depends on the **Playwright test project** being execut
- `showcase-runtime` - Runtime environment tests
- `showcase-sanity-plugins` - Plugin sanity tests
- `showcase-upgrade` - Upgrade scenario tests
- `showcase-localization-de` - German localization tests
- `showcase-localization-es` - Spanish localization tests
- `showcase-localization-fr` - French localization tests
- `showcase-localization-it` - Italian localization tests
- `showcase-localization-ja` - Japanese localization tests
Expand Down
4 changes: 2 additions & 2 deletions docs/e2e-tests/CI.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ The nightly job for the `main` branch also runs against three OpenShift Containe

Localization tests verify that the RHDH UI displays correctly translated strings for supported languages. These tests run as part of the OCP Helm nightly job.

- **Supported Languages:** French (fr), Italian (it), and Japanese (ja)
- **Supported Languages:** German (de), Spanish (es), French (fr), Italian (it), and Japanese (ja)
- **When They Run:** Localization tests run at the end of the OCP nightly job, after standard deployment tests, runtime config tests, and sanity plugin checks.
- **Skip Condition:** Localization tests are **skipped for OSD-GCP jobs** due to environment constraints.
- **Reuses Existing Deployment:** The tests run against the same RHDH instance deployed for standard tests, so no additional deployment is needed.
- **Playwright Projects:** `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja`
- **Playwright Projects:** `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja`

The localization test implementation is in `.ci/pipelines/jobs/ocp-nightly.sh` (`run_localization_tests()` function).

Expand Down
2 changes: 2 additions & 0 deletions e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"showcase-upgrade": "playwright test --project=showcase-upgrade",
"showcase-auth-providers": "playwright test --project=showcase-auth-providers",
"showcase-sanity-plugins": "playwright test --project=showcase-sanity-plugins",
"showcase-localization-de": "LOCALE=de playwright test --project=showcase-localization-de",
"showcase-localization-es": "LOCALE=es playwright test --project=showcase-localization-es",
"showcase-localization-fr": "LOCALE=fr playwright test --project=showcase-localization-fr",
"showcase-localization-it": "LOCALE=it playwright test --project=showcase-localization-it",
"showcase-localization-ja": "LOCALE=ja playwright test --project=showcase-localization-ja",
Expand Down
38 changes: 37 additions & 1 deletion e2e-tests/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@ const shouldSkipOrchestratorTests =
// Set LOCALE based on which project is being run
const args = process.argv;

if (args.some((arg) => arg.includes(PW_PROJECT.SHOWCASE_LOCALIZATION_FR))) {
if (args.some((arg) => arg.includes(PW_PROJECT.SHOWCASE_LOCALIZATION_DE))) {
process.env.LOCALE = "de";
} else if (
args.some((arg) => arg.includes(PW_PROJECT.SHOWCASE_LOCALIZATION_ES))
) {
process.env.LOCALE = "es";
} else if (
args.some((arg) => arg.includes(PW_PROJECT.SHOWCASE_LOCALIZATION_FR))
) {
process.env.LOCALE = "fr";
} else if (
args.some((arg) => arg.includes(PW_PROJECT.SHOWCASE_LOCALIZATION_IT))
Expand Down Expand Up @@ -247,6 +255,34 @@ export default defineConfig({
"**/playwright/e2e/plugins/quick-access-and-tech-radar.spec.ts",
],
},
{
name: PW_PROJECT.SHOWCASE_LOCALIZATION_DE,
use: {
locale: "de",
},
testMatch: [
"**/playwright/e2e/extensions.spec.ts",
"**/playwright/e2e/default-global-header.spec.ts",
"**/playwright/e2e/catalog-timestamp.spec.ts",
"**/playwright/e2e/custom-theme.spec.ts",
"**/playwright/e2e/plugins/frontend/sidebar.spec.ts",
"**/playwright/e2e/settings.spec.ts",
],
},
{
name: PW_PROJECT.SHOWCASE_LOCALIZATION_ES,
use: {
locale: "es",
},
testMatch: [
"**/playwright/e2e/extensions.spec.ts",
"**/playwright/e2e/default-global-header.spec.ts",
"**/playwright/e2e/catalog-timestamp.spec.ts",
"**/playwright/e2e/custom-theme.spec.ts",
"**/playwright/e2e/plugins/frontend/sidebar.spec.ts",
"**/playwright/e2e/settings.spec.ts",
],
},
{
name: PW_PROJECT.SHOWCASE_LOCALIZATION_FR,
use: {
Expand Down
8 changes: 2 additions & 6 deletions e2e-tests/playwright/e2e/extensions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@
await uiHelper.openSidebarButton(
t["rhdh"][lang]["menuItem.administration"],
);
// TODO: https://issues.redhat.com/browse/RHDHBUGS-2782
// await uiHelper.openSidebar(t["plugin.extensions"][lang]["header.title"]);
await uiHelper.openSidebar("Extensions");
await uiHelper.openSidebar(t["plugin.extensions"][lang]["header.title"]);
await uiHelper.verifyHeading(
t["plugin.extensions"][lang]["header.extensions"],
);
Expand Down Expand Up @@ -259,7 +257,6 @@
).toBeVisible();

for (const heading of commonHeadings) {
console.log(`Verifying heading: ${heading}`);
await uiHelper.verifyHeading(heading);
}

Expand Down Expand Up @@ -332,7 +329,6 @@

await uiHelper.verifyText(t["plugin.extensions"][lang]["metadata.about"]);
for (const heading of commonHeadings) {
console.log(`Verifying heading: ${heading}`);
await uiHelper.verifyHeading(heading);
}

Expand Down Expand Up @@ -396,7 +392,7 @@
await page.keyboard.press(`${modifier}+KeyA`);
await page.keyboard.press(`${modifier}+KeyV`);
await uiHelper.verifyText("pluginConfig:");
await page.locator(".copy-button").first().click();

Check warning on line 395 in e2e-tests/playwright/e2e/extensions.spec.ts

View workflow job for this annotation

GitHub Actions / TSC, ESLint and Prettier

Usage of raw locator detected. Use methods like .getByRole() or .getByText() instead of raw locators
await expect(
page.getByRole("button", { name: "✔" }).nth(0),
).toBeVisible();
Expand All @@ -410,7 +406,7 @@
await uiHelper.clickButton(t["plugin.extensions"][lang]["install.back"]);
await expect(
page.getByRole("button", {
name: t["plugin.extensions"][lang]["actions.view"],
name: new RegExp(`^${t["plugin.extensions"][lang]["actions.view"]}$`),
}),
).toBeVisible();
await uiHelper.verifyHeading("Application Topology for Kubernetes");
Expand Down
Loading
Loading