-
Task
-
Resolution: Unresolved
-
Major
-
None
-
None
-
False
-
-
False
-
-
Description
Migrate Topology E2E tests to workspaces/topology/e2e-tests/.
NOTE
This task is based on the existing RHDH core test case and may have missed some details. Please review the original test files in RHDH core before implementation.
Setup Prerequisites
Kubernetes Cluster Access: Service account with permissions to read cluster resources
- K8S_CLUSTER_TOKEN: Service account token for cluster access
- K8S_CLUSTER_URL: Kubernetes API server URL
Test Deployment: Kubernetes Deployment, Service, and optionally Route with backstage.io/kubernetes-id label
Based on RHDH core resources (.ibm/pipelines/resources/topology_test/topology-test.yaml):
apiVersion: apps/v1
kind: Deployment
metadata:
name: topology‑test
labels:
app.kubernetes.io/instance: topology‑test
app.kubernetes.io/name: topology‑test
backstage.io/kubernetes‑id: developer‑hub
annotations:
app.openshift.io/vcs‑uri: "https://github.com/janus‑idp/backstage‑showcase"
spec:
replicas: 1
selector:
matchLabels:
app: topology‑test
template:
metadata:
labels:
app: topology‑test
backstage.io/kubernetes‑id: developer‑hub
spec:
containers:
‑ name: topology
image: nginxinc/nginx‑unprivileged:stable‑alpine
ports:
‑ containerPort: 8080
For topology-rbac.spec.ts: RBAC permission enabled with kubernetes plugin permissions
Source Files (RHDH Core)
| File | Path |
|---|---|
| Test spec | e2e-tests/playwright/e2e/plugins/topology/topology.spec.ts |
| Test spec | e2e-tests/playwright/e2e/plugins/topology/topology-rbac.spec.ts |
| Page Object | e2e-tests/playwright/support/pages/topology.ts |
Plugin Packages
| Package | Type |
|---|---|
| backstage-community-plugin-topology | Frontend |
Acceptance Criteria
1. Create Workspace Structure
- [ ] Create workspaces/topology/e2e-tests/
- [ ] Copy standard config files from tech-radar reference
- [ ] Update package.json name and playwright.config.ts project name
2. Create RHDH Configuration (tests/config/)
- [ ] Create dynamic-plugins.yaml based on RHDH core dynamic-plugins.default.yaml:
plugins: ‑ package: ./dynamic‑plugins/dist/backstage‑community‑plugin‑topology disabled: false pluginConfig: dynamicPlugins: frontend: backstage‑community.plugin‑topology: mountPoints: ‑ mountPoint: entity.page.topology/cards importName: TopologyPage config: layout: gridColumn: 1 / ‑1 height: 75vh if: anyOf: ‑ hasAnnotation: backstage.io/kubernetes‑id ‑ hasAnnotation: backstage.io/kubernetes‑namespace
3. Migrate Test Files
- [ ] Create tests/specs/topology.spec.ts
- [ ] Create tests/specs/topology-rbac.spec.ts
- [ ] Create tests/pages/topology.page.ts
4. Verify All Tests Pass
- [ ] All 4 test cases pass
Test Cases (4 total)
1-4. Topology and Topology RBAC tests
Reference
- Template: workspaces/tech-radar/e2e-tests