-
Task
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
Task
As an engineer working on RHDH, I want Playwright project names decoupled from Kubernetes namespaces and defined in a single source of truth so that they can be flexibly reused and easily maintained.
Background
Previously:
- Playwright project names were hardcoded in multiple places: playwright.config.ts, CI job scripts, and package.json
- The namespace was implicitly tied to the Playwright project name, preventing flexible reuse
- This made maintenance error-prone and limited deployment flexibility
Solution
1. Decouple namespace from Playwright project name
check_and_test() and run_tests() now accept an explicit playwright_project argument separate from the namespace, allowing:
- Same namespace to run different test projects
- Same test project to run in different namespaces
- Independent configuration of deployment target and test suite
2. Single source of truth
Created e2e-tests/playwright/projects.json as the single source of truth. Consumed by:
_ _TypeScript* (playwright.config.ts) via projects.ts import
_ CI/CD scripts via playwright-projects.sh which exports $PW_PROJECT__ env vars
Acceptance Criteria
- [x] Decouple namespace from Playwright project name in CI functions
- [x] Create projects.json as single source of truth
- [x] TypeScript imports via projects.ts
- [x] CI scripts load via playwright-projects.sh
- [x] All CI job scripts updated to use shared variables
- [x] Documentation updated