Skip to content

refactor(e2e): consolidate auth and runtime test seams#5022

Open
schultzp2020 wants to merge 16 commits into
feat/e2e-hardeningfrom
feat/e2e-post-hardening-architecture
Open

refactor(e2e): consolidate auth and runtime test seams#5022
schultzp2020 wants to merge 16 commits into
feat/e2e-hardeningfrom
feat/e2e-post-hardening-architecture

Conversation

@schultzp2020

Copy link
Copy Markdown
Contributor

Summary

  • Consolidate guest and provider login flows behind shared @support/coverage/test fixtures plus dedicated support/auth/* modules so specs stop re-implementing browser/session setup.
  • Remove shallow helper and duplicate page layers, migrate more specs to focused page objects and semantic table helpers, and preserve the blocked GitHub happy path outside default discovery.
  • Centralize runtime deployment mutation and port-forward lifecycle for config-map, schema-mode, Redis, and external-database suites while tightening Playwright config and contributor guidance.

Architecture

Auth and session seams

graph TD
  Specs["E2E specs"] --> Fixtures["@support/coverage/test fixtures"]
  Fixtures --> Guest["guest-auth.ts"]
  Fixtures --> Provider["provider-auth.ts"]
  Guest --> AppShell["app-shell.ts"]
  Provider --> AuthHarness["AuthProviderHarness"]
  AuthHarness --> Deployment["RHDH deployment helpers"]
Loading

Runtime mutation seams

graph TD
  RuntimeSpecs["runtime/config-map, schema-mode, redis, external-db specs"] --> RuntimeHarness["RuntimeHarness"]
  RuntimeSpecs --> PortForward["PortForwardSession"]
  RuntimeHarness --> Kube["KubeClient"]
  RuntimeHarness --> Postgres["postgres-config helpers"]
  PortForward --> Cluster["oc/kubectl port-forward"]
Loading

Test plan

  • cd e2e-tests && yarn test:unit
  • cd e2e-tests && yarn lint
  • cd e2e-tests && yarn test:list
  • Run the cluster-backed Playwright projects in CI

Made with Cursor

schultzp2020 and others added 16 commits June 25, 2026 07:50
Close browser contexts in teardownBrowser, add teardown to auth-provider
specs, wait for /healthcheck before smoke login and drop 10 retries,
replace dispatchEvent clicks with native Playwright actions, and rename
BackstageShowcase to RhdhInstance with dedicated table page object.

Co-authored-by: Cursor <cursoragent@cursor.com>
Migrate all specs off direct UIhelper usage into page objects, add global
RHDH health setup and managed browser sessions, replace waitForSelector,
remove deprecated showcase selectors, rename catalog constants, enforce
critical axe violations, add stability script, and native fetch in Keycloak.

Co-authored-by: Cursor <cursoragent@cursor.com>
Centralize condition-based polling for K8s, log-follow, and login flows so tests fail fast instead of sleeping, and move per-spec timeouts into Playwright project config.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Add worker-scoped rhdhPage/rhdhContext fixtures in coverage/test.ts,
AuthProviderHarness for auth-provider deployment setup, and migrate
all serial specs off managed-browser. Push remaining spec locators into
POMs, replace waitForTextDisappear with expect().toBeHidden(), and
remove unused WaitStrategies.

Co-authored-by: Cursor <cursoragent@cursor.com>
Move legacy selectors into support/selectors, replace CatalogUsersPO with
CatalogUsersPage, and have high-traffic POMs call ui-helper modules directly.

Co-authored-by: Cursor <cursoragent@cursor.com>
Absorb settings aria snapshots, build info card checks, sidebar menu
assertions, and learning path link validation into SettingsPage and
SidebarPage so specs no longer use raw page locators.

Co-authored-by: Cursor <cursoragent@cursor.com>
Cover sleep, pollUntil, pollUntilStable, pollForValue, and
waitForNextTotpWindow with fake timers, and wire yarn test:unit into CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
Scope Playwright to playwright/e2e, move Vitest tests to e2e-tests/unit,
split Oxlint Playwright rules to *.spec.ts and Vitest plugin to *.test.ts.

Co-authored-by: Cursor <cursoragent@cursor.com>
Load Playwright and Vitest only via file-pattern overrides instead of
global plugins with cross-disable rules.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
parseLogFromJson was wrapping JSON.parse output in new Log(), which filled
missing status and actor fields with constructor defaults and let validation
pass when the backend omitted required fields. Compare the parsed object
directly, matching pre-oxlint behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
Reconcile PR3 folder layout with PR4 hardening changes: kube-client
submodules, rhdh-deployment types/wait, coverage browser fixture, legacy
ui-locators selectors, and semantic wait-strategies.

Co-authored-by: Cursor <cursoragent@cursor.com>
OpenShift routes use self-signed certs; the API request context in
globalSetup must match playwright.config.ts ignoreHTTPSErrors.

Co-authored-by: Cursor <cursoragent@cursor.com>
Worker-scoped rhdhContext runs before testInfo.file is set; fall back to
worker index for video output paths. Exclude documented RHDHPLAN-954 shell
axe rules and wait for progress bars before scanning.

Co-authored-by: Cursor <cursoragent@cursor.com>
Unify login, shared browser lifecycle, and runtime cluster mutation behind fixtures and harnesses so specs stop duplicating fragile setup code and legacy helper layers.

Co-authored-by: Cursor <cursoragent@cursor.com>
@openshift-ci openshift-ci Bot requested review from pabel-rh and rostalan June 25, 2026 16:42
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

Image was built and published successfully. It is available at:

@openshift-ci

openshift-ci Bot commented Jun 26, 2026

Copy link
Copy Markdown

PR needs rebase.

Details

Instructions 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant