Skip to content

Commit 2cd9fa6

Browse files
committed
chore(tech-radar): add new frontend system e2e test
This change adds an additional test project that runs RHDH with app-next instead of app to test the plugin in the new frontend system. Assisted-by: Cursor rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
1 parent 26c35e2 commit 2cd9fa6

6 files changed

Lines changed: 41 additions & 5 deletions

File tree

workspaces/tech-radar/e2e-tests/playwright.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,8 @@ export default defineConfig({
1111
{
1212
name: "tech-radar",
1313
},
14+
{
15+
name: "tech-radar-app-next",
16+
},
1417
],
1518
});
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
app:
2+
title: RHDH Tech Radar Test Instance (app-next)
3+
backend:
4+
reading:
5+
allow:
6+
- host: ${TECH_RADAR_DATA_URL}
7+
techRadar:
8+
url: "http://${TECH_RADAR_DATA_URL}/tech-radar"
9+
signInPage: oidc

workspaces/tech-radar/e2e-tests/tests/config/app-config-rhdh.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
# rhdh app config file
2-
# this file is used to merge with the default values of the rhdh app config
3-
41
app:
5-
title: RHDH Tech Radar Test Instance
2+
title: RHDH Tech Radar Test Instance (app)
63
backend:
74
reading:
85
allow:
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
plugins:
2+
- package: oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-app-auth:bs_1.49.4__0.0.1!red-hat-developer-hub-backstage-plugin-app-auth
3+
disabled: false
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
name: rhdh-secrets
5+
type: Opaque
6+
stringData:
7+
TECH_RADAR_DATA_URL: $TECH_RADAR_DATA_URL
8+
APP_CONFIG_app_packageName: app-next
9+
ENABLE_STANDARD_MODULE_FEDERATION: "true"

workspaces/tech-radar/e2e-tests/tests/specs/tech-radar.spec.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,30 @@ import { test, expect, Page } from "@red-hat-developer-hub/e2e-test-utils/test";
22
import { $ } from "@red-hat-developer-hub/e2e-test-utils/utils";
33
import path from "path";
44

5+
const secretsFileAppNext = "tests/config/rhdh-secrets-next.yaml";
6+
const configFileAppNext = "tests/config/app-config-rhdh-next.yaml";
57
const setupScript = path.join(
68
import.meta.dirname,
79
"deploy-customization-provider.sh",
810
);
911

12+
// TEMPORARY: Use RHDH image from PR 4317 for CI to validate the image. Remove when no longer needed:
13+
// - Delete tests/config/value_file-pr-4317.yaml
14+
// - Remove the valueFile line below from the rhdh.configure() call
15+
const valueFilePr4317 = "tests/config/value_file-pr-4317.yaml";
16+
1017
test.describe("Test tech-radar plugin", () => {
1118
test.beforeAll(async ({ rhdh }) => {
1219
const project = rhdh.deploymentConfig.namespace;
13-
await rhdh.configure({ auth: "keycloak" });
20+
await rhdh.configure({
21+
auth: "keycloak",
22+
// TEMPORARY: override Helm image to quay.io/rhdh-community/rhdh:pr-4317 (remove with valueFilePr4317)
23+
valueFile: valueFilePr4317,
24+
...(project === "tech-radar-app-next" && {
25+
appConfig: configFileAppNext,
26+
secrets: secretsFileAppNext,
27+
}),
28+
});
1429
await $`bash ${setupScript} ${project}`;
1530
process.env.TECH_RADAR_DATA_URL = (
1631
await rhdh.k8sClient.getRouteLocation(

0 commit comments

Comments
 (0)