Skip to content

Commit 7bc900b

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 b5a0915 commit 7bc900b

3 files changed

Lines changed: 25 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
});
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Framework defaults (extraAppConfig, extraEnvVarsSecrets) ensure the chart mounts
2+
# app-config-rhdh and rhdh-secrets so DB and other env vars work. We add our
3+
# extraEnvVars on top so we don't rely on the default value file being merged.
4+
upstream:
5+
backstage:
6+
extraAppConfig:
7+
- configMapRef: app-config-rhdh
8+
filename: app-config-rhdh.yaml
9+
extraEnvVarsSecrets:
10+
- rhdh-secrets
11+
extraEnvVars:
12+
- name: APP_CONFIG_app_packageName
13+
value: "app-next"
14+
- name: ENABLE_STANDARD_MODULE_FEDERATION
15+
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)