Skip to content

Commit 06e8eea

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
1 parent 8b940ca commit 06e8eea

4 files changed

Lines changed: 29 additions & 1 deletion

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
});

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,11 @@ metadata:
44
name: rhdh-secrets
55
type: Opaque
66
stringData:
7+
RHDH_BASE_URL: $RHDH_BASE_URL
8+
KEYCLOAK_BASE_URL: $KEYCLOAK_BASE_URL
9+
KEYCLOAK_METADATA_URL: $KEYCLOAK_METADATA_URL
10+
KEYCLOAK_CLIENT_ID: $KEYCLOAK_CLIENT_ID
11+
KEYCLOAK_CLIENT_SECRET: $KEYCLOAK_CLIENT_SECRET
12+
KEYCLOAK_REALM: $KEYCLOAK_REALM
13+
KEYCLOAK_LOGIN_REALM: $KEYCLOAK_LOGIN_REALM
714
TECH_RADAR_DATA_URL: $TECH_RADAR_DATA_URL
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
upstream:
2+
backstage:
3+
extraAppConfig:
4+
- configMapRef: app-config-rhdh
5+
filename: app-config-rhdh.yaml
6+
extraEnvVarsSecrets:
7+
- rhdh-secrets
8+
extraEnvVars:
9+
- name: APP_CONFIG_app_packageName
10+
value: "app-next"
11+
- name: ENABLE_STANDARD_MODULE_FEDERATION
12+
value: "true"

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ const setupScript = path.join(
1010
test.describe("Test tech-radar plugin", () => {
1111
test.beforeAll(async ({ rhdh }) => {
1212
const project = rhdh.deploymentConfig.namespace;
13-
await rhdh.configure({ auth: "keycloak" });
13+
const useNewFrontend = project === "tech-radar-app-next";
14+
await rhdh.configure({
15+
auth: "keycloak",
16+
...(useNewFrontend && {
17+
valueFile: path.join(import.meta.dirname, "..", "config", "value-file-app-next.yaml"),
18+
}),
19+
});
1420
await $`bash ${setupScript} ${project}`;
1521
process.env.TECH_RADAR_DATA_URL = (
1622
await rhdh.k8sClient.getRouteLocation(

0 commit comments

Comments
 (0)