feat(e2e): cluster-free local E2E harness (legacy app, Tier B)#5005
feat(e2e): cluster-free local E2E harness (legacy app, Tier B)#5005gustavolira wants to merge 8 commits into
Conversation
Run real Playwright E2E against RHDH without an OpenShift/Kubernetes cluster or container images — Playwright boots the backend and a frontend dev server in-process and drives the browser against them. - Legacy harness (Tier B, recommended): targets packages/app with dynamic plugins loaded via Scalprum, so the EXISTING specs run unmodified. Verified the production RHDH home page (Quick Access from the dynamic home-page plugin) renders off-cluster and the guest-signin home-page test passes. - app-next harness: targets the new frontend system; covers core/statically registered plugin UIs (dynamic frontend loading is blocked upstream — see doc). - Shared guest-auth + in-memory-SQLite overlay (app-config.local-e2e.yaml); webServer invokes backstage-cli/janus-cli from the repo-root .bin. - yarn scripts: e2e:legacy-local, e2e:app-next-local. Part of RHIDP-13501 (E2E Test Optimization), Layer 4a spike RHIDP-15075. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PR Summary by QodoAdd cluster-free local Playwright E2E harnesses (legacy Tier B + app-next) Description
Diagram
High-Level Assessment
Files changed (6)
|
Code Review by Qodo
1. Wrong server reused
|
- Scope legacy testMatch to the spec verified to pass off-cluster (learning-path-page); document the others as pending the global-header mount fix / per-spec config so the default run is green. - Guard PATH interpolation against an undefined process.env.PATH via a shared pathWithRepoBin constant in both configs. - Default CATALOG_INDEX_IMAGE to quay.io/rhdh/plugin-catalog-index:latest for main (release branches use the matching :1.y tag). - Note that the guest-auth overlay is test-only and must never reach a production config; drop a duplicated comment. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The container image build workflow finished with status: |
The chosen direction is the legacy cluster-free harness (packages/app), which runs the existing specs unmodified. The app-next harness can't load dynamic plugins yet (blocked upstream), so it's removed from this PR and tracked as a follow-up; a short note in the doc records why legacy is the target. - Remove playwright.app-next-local.config.ts and its guest-identity.spec.ts. - Remove the e2e:app-next-local script. - Make the overlay and docs legacy-only (keep a "why not app-next yet" note). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Scope the default run to the one verified-green test (guest-signin home-page) via testMatch + grep, instead of an unvalidated spec whose sidebar navigation may not match the harness config. - Add a globalSetup that fails fast with the populate command when dynamic-plugins-root is empty (clear error instead of a locator timeout). - Build the shared --config args via array join; document workers=1 and that the backend command mirrors packages/backend's start script. - Doc: describe the grep-scoped default run and the fail-fast guard. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The container image build workflow finished with status: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5005 +/- ##
=======================================
Coverage 55.39% 55.39%
=======================================
Files 122 122
Lines 2365 2365
Branches 568 563 -5
=======================================
Hits 1310 1310
- Misses 1048 1049 +1
+ Partials 7 6 -1
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
…h 80) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
/test e2e-ocp-helm-nightly |
Add .github/workflows/e2e-cluster-free.yaml: a no-cluster job that installs deps + skopeo, populates dynamic-plugins-root from the public catalog index via the install-dynamic-plugins CLI (same mechanism as the nightly sanity check), boots the backend + legacy app dev servers in-process, and runs yarn e2e:legacy-local. Triggers on e2e-tests/** and app-config*.yaml. Follows the project workflow-security rules: pull_request (no secrets, public image), pinned action SHAs, minimal permissions, concurrency control. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The 'Install Playwright browser' step hung on 'playwright install --with-deps' (its apt phase); drop --with-deps since ubuntu-latest already has the libs headless chromium needs. Add setup-node yarn caching for both lockfiles to cut the slow root install on subsequent runs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Use mcr.microsoft.com/playwright:v1.59.1-noble (browsers + OS deps preinstalled, matching @playwright/test 1.59.1) to eliminate the playwright-install step that hung on plain ubuntu runners. Enable corepack for the vendored yarn 4 and cache the yarn global cache explicitly (the container lacks the yarn binary setup-node's cache relies on). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
|
@gustavolira: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |



Summary
Adds a cluster-free local E2E harness for the legacy frontend (
packages/app, Tier B): run real Playwright E2E against RHDH without an OpenShift/Kubernetes cluster or container images. Playwright boots the backend and the legacy app dev server in-process and drives the browser against them — and it runs on GitHub Actions in a no-cluster phase.Part of RHIDP-13501 (E2E Test Optimization), Layer 4a spike RHIDP-15075. Builds on the PoC in #4523 and the backend dynamic-plugin loader from RHIDP-13508.
How it runs
.github/workflows/e2e-cluster-free.yaml(cluster-free GitHub Actions job):dynamic-plugins-rootfrom the public catalog index via theinstall-dynamic-pluginsCLI (same mechanism as the nightly sanity check)yarn e2e:legacy-local— boots backend + legacy app dev servers in-process, runs the verified testLocally:
Why
The existing E2E specs target the legacy app, so this harness runs them unmodified — no rewrite. Dynamic frontend plugins load via Scalprum exactly as in-cluster. This is faster and lighter than
rhdh-local(container-image based) for automated testing.What's verified
guest-signin-happy-pathhome-page test passes unmodified. The default run isgrep-scoped to exactly that test.globalSetupfails fast with the populate command ifdynamic-plugins-rootis empty.Known issues / follow-ups (documented in
docs/e2e-tests/local-e2e-harness.md)global-headerplugin mounting still needs config sorting; specs that navigate via the top-right profile dropdown depend on it, so the run is scoped to the verified home-page test for now. WidentestMatch/grepas specs are validated.e2e-tests/**+app-config*.yaml; can widen topackages/app/**/packages/backend/**once proven stable.packages/app-nextcan't load dynamic frontend plugins yet (blocked upstream on standard Module Federation assets). Tracked under RHIDP-15082.🤖 Generated with Claude Code