Skip to content

[WIP] CNTRLPLANE-3846: Bring UI E2E infra into Hypershift repo#9065

Draft
georgelipceanu wants to merge 1 commit into
openshift:mainfrom
georgelipceanu:mce-ui-migration
Draft

[WIP] CNTRLPLANE-3846: Bring UI E2E infra into Hypershift repo#9065
georgelipceanu wants to merge 1 commit into
openshift:mainfrom
georgelipceanu:mce-ui-migration

Conversation

@georgelipceanu

@georgelipceanu georgelipceanu commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

This PR sets up UI E2E infrastructure based on current UI E2E standards. This includes:

  • Test Configuration (playwright.config.ts)
    • 3 projects: setup (auth), common (smoke), agent (platform tests - placeholder at the moment for test cases marked for migration)
    • StorageState pattern for session persistence
    • TypeScript path aliases: @config, @services, @fixtures, @constants, @utils
  • Basic smoke tests (smoke.spec.ts)
    • Console authentication and navigation
    • Environment configuration loading
    • Cluster API accessibility
    • MCE console route detection
  • Makefile Integration
    • make test-ui-install: Install dependencies and Playwright browsers
    • make test-ui-common: Run smoke tests

Which issue(s) this PR fixes:

Fixes CNTRLPLANE-3846

Special notes for your reviewer:

  • This PR includes a README in the test/ui directory, similar to other test directories.
  • This is simply the infrastructure for Playwright UI tests, the migration of test cases and CI will be covered in subsequent PRs (which can be found in child tickets of CNTRLPLANE-2104)

To verify and debug these changes, this was run on an MCE cluster. The commands that were run were as follows:

make test-ui-install
make ui-test-common

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

Summary by CodeRabbit

  • New Features

    • Added a Playwright-based HyperShift UI end-to-end test framework with console smoke coverage, console authentication setup, and automatic cleanup of created resources, including safe name generation.
    • Added new Makefile targets to install and run UI tests (headless, headed, and project-scoped variants).
  • Bug Fixes

    • Improved codespell verification by skipping common UI test artifacts.
  • Documentation

    • Added UI test README and environment variable template.
  • Chores

    • Added UI test project configuration (lint/format/typecheck), ignore/formatter rules, and an automated dependency update rule for UI tests.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot

openshift-ci-robot commented Jul 22, 2026

Copy link
Copy Markdown

@georgelipceanu: This pull request references CNTRLPLANE-3846 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

What this PR does / why we need it:

This PR sets up UI E2E infrastructure based on current UI E2E standards. This includes:

  • Test Configuration (playwright.config.ts)
  • 3 projects: setup (auth), common (smoke), agent (platform tests - placeholder at the moment for test cases marked for migration)
  • StorageState pattern for session persistence
  • TypeScript path aliases: @config, @services, @fixtures, @constants, @utils
  • Basic smoke tests (smoke.spec.ts)
  • Console authentication and navigation
  • Environment configuration loading
  • Cluster API accessibility
  • MCE console route detection
  • Makefile Integration
  • make test-ui-install: Install dependencies and Playwright browsers
  • make test-ui-common: Run smoke tests

Which issue(s) this PR fixes:

Fixes CNTRLPLANE-3846

Special notes for your reviewer:

  • This PR includes a README in the test/ui directory, similar to other test directories.
  • This is simply the infrastructure for Playwright UI tests, the migration of test cases and CI will be covered in subsequent PRs (which can be found in child tickets of CNTRLPLANE-2104)

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 22, 2026
@openshift-ci openshift-ci Bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/needs-area labels Jul 22, 2026
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Added a Playwright-based UI E2E test project under test/ui. It defines package tooling, environment validation, console authentication with shared browser state, OpenShift CLI services and cleanup fixtures, smoke tests, Makefile targets, Dependabot grouping, and usage documentation for common and agent projects.

Sequence Diagram(s)

sequenceDiagram
  participant Playwright
  participant auth.setup
  participant OpenShiftConsole
  participant AdminStorageState
  participant UIProjects
  Playwright->>auth.setup: Run setup project
  auth.setup->>OpenShiftConsole: Log in with configured credentials
  OpenShiftConsole-->>auth.setup: Expose authenticated UI state
  auth.setup->>AdminStorageState: Save admin.json storage state
  UIProjects->>AdminStorageState: Load shared storage state
  UIProjects->>OpenShiftConsole: Run common or agent tests
Loading

Suggested reviewers: devguyio, muraee

🚥 Pre-merge checks | ✅ 10 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Ipv6 And Disconnected Network Test Compatibility ⚠️ Warning test-ui-install runs npm ci and npx playwright install chromium, which fetch public packages/browser binaries and will break in disconnected CI. Use mirrored/cached npm and Playwright artifacts, or avoid running this setup in disconnected jobs; ensure the tests themselves don’t depend on public internet.
✅ Passed checks (10 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed New UI tests use only static titles (e.g. one describe block and four fixed test names) with no interpolation or generated values.
Test Structure And Quality ✅ Passed PASS: the PR adds Playwright tests only; no Ginkgo Describe/It/Eventually code is present, so this Ginkgo-specific check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed No deployment manifests or controllers were added; the PR only adds Playwright UI-test infrastructure, so topology scheduling constraints don't apply.
No-Weak-Crypto ✅ Passed No weak crypto APIs, custom crypto, or secret/token comparisons were found; the new UI files only use ordinary env/string checks and Math.random for name suffixes.
Container-Privileges ✅ Passed No changed test/ui files contain privileged, hostPID/Network/IPC, SYS_ADMIN, or allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed Logs are generic status messages; credentials/session data aren’t printed, and oc failures are explicitly redacted.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding UI E2E infrastructure under the HyperShift repo.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from devguyio and muraee July 22, 2026 18:47
@openshift-ci openshift-ci Bot added area/testing Indicates the PR includes changes for e2e testing and removed do-not-merge/needs-area labels Jul 22, 2026
@openshift-ci

openshift-ci Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: georgelipceanu
Once this PR has been reviewed and has the lgtm label, please assign sjenning for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 14

🧹 Nitpick comments (2)
Makefile (1)

714-719: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Use the checked-in lockfile for UI installs.

Line [717] runs npm install even though test/ui/package-lock.json exists. This can re-resolve dependency ranges and rewrite the lockfile, making local and future CI runs non-reproducible. Use npm ci instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Makefile` around lines 714 - 719, Update the test-ui-install target to use
npm ci instead of npm install when installing dependencies in test/ui, so the
checked-in package-lock.json is honored. Leave the Playwright browser
installation step unchanged.
test/ui/src/tests/common/smoke.spec.ts (1)

27-28: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use the shared PatternFly selectors.

test/ui/src/constants/index.ts:7-8 already exports these selectors, but this test redeclares them. Import PF_SPINNER and PF_SKELETON from @constants to prevent selector drift.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/ui/src/tests/common/smoke.spec.ts` around lines 27 - 28, Remove the
local PF_SPINNER and PF_SKELETON declarations in the smoke test and import both
shared selectors from `@constants` instead, preserving their existing usages.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Makefile`:
- Line 643: Update the codespell command in the Makefile to add
./test/ui/test-results/* to its --skip list, alongside the existing Playwright
report and node_modules exclusions, while preserving all other skip entries.
- Around line 736-739: Update the test-ui-agent target to handle the currently
empty agent test suite by passing Playwright’s --pass-with-no-tests option or
otherwise deferring the target until agent specs exist. Preserve the existing
installation, status message, and agent project selection.

In `@test/ui/playwright.config.ts`:
- Around line 22-26: Replace direct process.env.CI checks in the Playwright
configuration with the parsed config.ci flag for forbidOnly, retries, and
workers. Preserve the existing CI-specific values and local defaults while
ensuring the string value "false" is treated as disabled.

In `@test/ui/README.md`:
- Around line 136-156: Update the fenced directory-tree block in the README to
declare the text language, changing the opening fence before the test/ui tree to
use text while preserving the tree contents.
- Around line 58-62: Update the Scope description in the test project table to
use the compound adjective “Agent-platform HyperShift tests,” preserving the
rest of the table entry unchanged.
- Around line 34-37: Normalize the CI flag handling in the Playwright
configuration so the string value "false" does not enable CI behavior: treat CI
as enabled only when process.env.CI equals "true". Update the CI entry in
test/ui/README.md to document the same exact semantics and default.
- Around line 160-163: Update the “Writing New Tests” instructions to direct
authors to the configured test directories, replacing src/tests/hypershift/ with
src/tests/common/ while retaining src/tests/agent/. Do not add a Playwright
project; align the documentation with the existing test collection
configuration.

In `@test/ui/src/auth.setup.ts`:
- Around line 17-23: Unify authentication with the shared configuration
contract: update test/ui/src/auth.setup.ts lines 17-23 to use config.consoleUrl
and the related shared authentication values instead of directly requiring
process.env.CONSOLE_URL; update test/ui/.env.example lines 4-10 to document
CONSOLE_URL as an optional override, unless the direct lookup is intentionally
retained and made required.

In `@test/ui/src/config/index.ts`:
- Around line 17-27: Update deriveConsoleUrl to parse hubUrl with new URL and
validate the trust-boundary input before deriving the console host: require
HTTPS, a hostname beginning with api., and reject username/password, non-root
paths, queries, and fragments. Use an anchored allow-list validation with
appropriate hostname normalization, then construct the console URL from the
validated hostname; preserve the explicit CONSOLE_URL override.

In `@test/ui/src/services/OcCliService.ts`:
- Around line 11-13: Update OcCliService.run to invoke execPromise with a finite
timeout option, and explicitly surface timeout failures while preserving the
existing command output and error behavior. Because deleteNamespace uses run,
ensure its oc invocation is covered by the same timeout.
- Around line 11-13: Update OcCliService.run and the applyYaml, deleteYaml, and
deleteNamespace callers to avoid shell interpolation by invoking oc through
execFile with an argument array. Validate YAML paths and namespace values before
execution, then pass only validated values as separate arguments to preserve the
existing CLI operations.

In `@test/ui/src/tests/common/smoke.spec.ts`:
- Around line 12-13: Update the heading assertion to use page.getByRole with
role "heading" and name /OpenShift/i instead of page.getByText, while preserving
the first-match selection and existing visibility timeout.
- Around line 21-25: Update the optional 404 handling in the smoke test so it
waits for either the 404 message or the normal page-ready condition before
branching; do not rely on the immediate snapshot from pageNotFound.count().
Preserve the existing early return and MCE-path behavior once the awaited
outcome is known.

In `@test/ui/src/utils/kube-helper.ts`:
- Around line 11-13: Update generateSafeName to normalize the prefix, require a
non-empty DNS-label-safe value using an allow-list, and limit it to 57
characters before appending the five-character suffix. Reject invalid or empty
prefixes rather than generating names that violate Kubernetes’ 63-character
naming limit.

---

Nitpick comments:
In `@Makefile`:
- Around line 714-719: Update the test-ui-install target to use npm ci instead
of npm install when installing dependencies in test/ui, so the checked-in
package-lock.json is honored. Leave the Playwright browser installation step
unchanged.

In `@test/ui/src/tests/common/smoke.spec.ts`:
- Around line 27-28: Remove the local PF_SPINNER and PF_SKELETON declarations in
the smoke test and import both shared selectors from `@constants` instead,
preserving their existing usages.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 9b661793-902b-427d-a19f-80065c1219ab

📥 Commits

Reviewing files that changed from the base of the PR and between 09265ac and 4a12cec.

⛔ Files ignored due to path filters (1)
  • test/ui/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (20)
  • .github/dependabot.yml
  • Makefile
  • test/ui/.env.example
  • test/ui/.gitignore
  • test/ui/.prettierignore
  • test/ui/.prettierrc
  • test/ui/README.md
  • test/ui/eslint.config.mjs
  • test/ui/package.json
  • test/ui/playwright.config.ts
  • test/ui/src/auth.setup.ts
  • test/ui/src/config/index.ts
  • test/ui/src/constants/index.ts
  • test/ui/src/global-setup.ts
  • test/ui/src/services/OcCliService.ts
  • test/ui/src/services/index.ts
  • test/ui/src/tests/common/smoke.spec.ts
  • test/ui/src/utils/index.ts
  • test/ui/src/utils/kube-helper.ts
  • test/ui/tsconfig.json

Comment thread Makefile Outdated
Comment thread Makefile
Comment thread test/ui/playwright.config.ts Outdated
Comment thread test/ui/README.md Outdated
Comment thread test/ui/README.md Outdated
Comment thread test/ui/src/config/index.ts Outdated
Comment thread test/ui/src/services/OcCliService.ts Outdated
Comment thread test/ui/src/tests/common/smoke.spec.ts Outdated
Comment thread test/ui/src/tests/common/smoke.spec.ts Outdated
Comment thread test/ui/src/utils/kube-helper.ts Outdated
@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 44.50%. Comparing base (09265ac) to head (8aa6286).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9065   +/-   ##
=======================================
  Coverage   44.50%   44.50%           
=======================================
  Files         774      774           
  Lines       96980    96980           
=======================================
  Hits        43164    43164           
  Misses      50828    50828           
  Partials     2988     2988           
Flag Coverage Δ
cmd-support 38.39% <ø> (ø)
cpo-hostedcontrolplane 47.19% <ø> (ø)
cpo-other 45.25% <ø> (ø)
hypershift-operator 54.44% <ø> (ø)
other 32.64% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@georgelipceanu
georgelipceanu force-pushed the mce-ui-migration branch 2 times, most recently from c2b2479 to b758577 Compare July 23, 2026 08:03

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (1)
test/ui/src/fixtures/hypershift-test.ts (1)

62-64: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Fixed 2s delay is a heuristic, not a guarantee.

Waiting a flat 2000ms for HostedCluster finalizers before deleting namespaces may be too short under load; consider polling for HostedCluster deletion completion (or increasing/backing off) instead of a fixed sleep. Low priority since failures here are caught and only logged.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/ui/src/fixtures/hypershift-test.ts` around lines 62 - 64, Replace the
fixed 2000ms delay in the hostedClusters cleanup flow with polling that waits
until the HostedCluster resources are deleted, using a timeout and retry/backoff
to avoid indefinite waiting. Preserve the existing behavior when no
HostedClusters exist and retain the current cleanup error handling.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/ui/README.md`:
- Around line 40-42: Keep the CI note in README as a single contiguous
blockquote by removing the blank line between its lines or adding a blockquote
marker to that line, ensuring Markdownlint MD028 passes.
- Around line 23-28: Update the environment variable table in the README to add
the optional CONSOLE_URL entry, documenting that it overrides the console URL
and defaults to a value derived from HUB_URL. Keep the existing table formatting
and descriptions unchanged.

In `@test/ui/src/services/OcCliService.ts`:
- Around line 52-61: Update OcCliService.run to pass an appropriate timeout
option to execFilePromise when invoking oc, ensuring hung commands terminate
instead of blocking the Playwright worker indefinitely. Preserve the existing
stdout trimming, redacted failure logging, and error propagation behavior.
- Around line 57-60: Update the error handling around the oc command execution
in OcCliService so console.error does not receive the raw execFile error object.
Log only a sanitized, non-command-specific message while preserving the existing
rethrow behavior.

---

Nitpick comments:
In `@test/ui/src/fixtures/hypershift-test.ts`:
- Around line 62-64: Replace the fixed 2000ms delay in the hostedClusters
cleanup flow with polling that waits until the HostedCluster resources are
deleted, using a timeout and retry/backoff to avoid indefinite waiting. Preserve
the existing behavior when no HostedClusters exist and retain the current
cleanup error handling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 63944333-6914-41ac-a8da-04cacf5dfed5

📥 Commits

Reviewing files that changed from the base of the PR and between 4a12cec and b758577.

⛔ Files ignored due to path filters (1)
  • test/ui/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (21)
  • .github/dependabot.yml
  • Makefile
  • test/ui/.env.example
  • test/ui/.gitignore
  • test/ui/.prettierignore
  • test/ui/.prettierrc
  • test/ui/README.md
  • test/ui/eslint.config.mjs
  • test/ui/package.json
  • test/ui/playwright.config.ts
  • test/ui/src/auth.setup.ts
  • test/ui/src/config/index.ts
  • test/ui/src/constants/index.ts
  • test/ui/src/fixtures/hypershift-test.ts
  • test/ui/src/global-setup.ts
  • test/ui/src/services/OcCliService.ts
  • test/ui/src/services/index.ts
  • test/ui/src/tests/common/smoke.spec.ts
  • test/ui/src/utils/index.ts
  • test/ui/src/utils/kube-helper.ts
  • test/ui/tsconfig.json
🚧 Files skipped from review as they are similar to previous changes (14)
  • test/ui/src/constants/index.ts
  • test/ui/package.json
  • test/ui/src/utils/index.ts
  • test/ui/eslint.config.mjs
  • test/ui/.gitignore
  • test/ui/.prettierrc
  • test/ui/src/services/index.ts
  • test/ui/src/global-setup.ts
  • test/ui/.prettierignore
  • test/ui/playwright.config.ts
  • test/ui/src/config/index.ts
  • test/ui/src/tests/common/smoke.spec.ts
  • test/ui/src/utils/kube-helper.ts
  • .github/dependabot.yml

Comment thread test/ui/README.md Outdated
Comment thread test/ui/README.md
Comment thread test/ui/src/services/OcCliService.ts Outdated
Comment thread test/ui/src/services/OcCliService.ts Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/ui/README.md`:
- Around line 17-29: Separate the Markdown tables in the README by adding blank
lines after the Hub cluster and console authentication table and before the
Playwright Projects heading, while preserving the existing table content and
pipe formatting.

In `@test/ui/src/config/index.ts`:
- Around line 21-23: Update the explicitConsoleUrl branch in the configuration
URL resolver to parse CONSOLE_URL and validate it before returning: require
HTTPS, reject username/password userinfo, and allow only the configured console
host/origin allow-list. Preserve the existing fallback behavior when the
override is absent or invalid, and reuse the project’s established URL
validation symbols where available.

In `@test/ui/src/services/OcCliService.ts`:
- Around line 36-40: The YAML path validation around normalized must inspect the
raw yamlPath segments before normalization, rejecting only exact ".." segments
so names such as "version..yaml" remain valid. Preserve traversal protection
and, if workspace confinement is required by this flow, verify the resolved path
remains within the workspace after resolution.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: fea281d3-6c31-4658-8712-12c707d471ed

📥 Commits

Reviewing files that changed from the base of the PR and between b758577 and 27d4da0.

⛔ Files ignored due to path filters (1)
  • test/ui/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (21)
  • .github/dependabot.yml
  • Makefile
  • test/ui/.env.example
  • test/ui/.gitignore
  • test/ui/.prettierignore
  • test/ui/.prettierrc
  • test/ui/README.md
  • test/ui/eslint.config.mjs
  • test/ui/package.json
  • test/ui/playwright.config.ts
  • test/ui/src/auth.setup.ts
  • test/ui/src/config/index.ts
  • test/ui/src/constants/index.ts
  • test/ui/src/fixtures/hypershift-test.ts
  • test/ui/src/global-setup.ts
  • test/ui/src/services/OcCliService.ts
  • test/ui/src/services/index.ts
  • test/ui/src/tests/common/smoke.spec.ts
  • test/ui/src/utils/index.ts
  • test/ui/src/utils/kube-helper.ts
  • test/ui/tsconfig.json
🚧 Files skipped from review as they are similar to previous changes (15)
  • test/ui/.prettierignore
  • test/ui/src/constants/index.ts
  • test/ui/src/utils/index.ts
  • test/ui/eslint.config.mjs
  • test/ui/src/services/index.ts
  • test/ui/package.json
  • test/ui/tsconfig.json
  • test/ui/.prettierrc
  • test/ui/playwright.config.ts
  • test/ui/.gitignore
  • test/ui/src/global-setup.ts
  • test/ui/src/utils/kube-helper.ts
  • test/ui/src/auth.setup.ts
  • test/ui/src/fixtures/hypershift-test.ts
  • test/ui/src/tests/common/smoke.spec.ts

Comment thread test/ui/README.md
Comment thread test/ui/src/config/index.ts
Comment thread test/ui/src/services/OcCliService.ts Outdated
@georgelipceanu
georgelipceanu marked this pull request as draft July 23, 2026 09:51

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
test/ui/README.md (1)

1-151: 📐 Maintainability & Code Quality | 🔵 Trivial

Run make verify-codespell for this Markdown file.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/ui/README.md` around lines 1 - 151, Run make verify-codespell against
test/ui/README.md and correct any reported spelling issues in the documentation,
preserving the existing content and formatting.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/ui/README.md`:
- Around line 49-50: Add a blank line between the “Playwright Projects” heading
and its following projects table in the README, leaving the table content
unchanged.

---

Nitpick comments:
In `@test/ui/README.md`:
- Around line 1-151: Run make verify-codespell against test/ui/README.md and
correct any reported spelling issues in the documentation, preserving the
existing content and formatting.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 26426ca6-bfb9-40f9-932d-bc016eb2a6b6

📥 Commits

Reviewing files that changed from the base of the PR and between 27d4da0 and 212c656.

⛔ Files ignored due to path filters (1)
  • test/ui/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (21)
  • .github/dependabot.yml
  • Makefile
  • test/ui/.env.example
  • test/ui/.gitignore
  • test/ui/.prettierignore
  • test/ui/.prettierrc
  • test/ui/README.md
  • test/ui/eslint.config.mjs
  • test/ui/package.json
  • test/ui/playwright.config.ts
  • test/ui/src/auth.setup.ts
  • test/ui/src/config/index.ts
  • test/ui/src/constants/index.ts
  • test/ui/src/fixtures/hypershift-test.ts
  • test/ui/src/global-setup.ts
  • test/ui/src/services/OcCliService.ts
  • test/ui/src/services/index.ts
  • test/ui/src/tests/common/smoke.spec.ts
  • test/ui/src/utils/index.ts
  • test/ui/src/utils/kube-helper.ts
  • test/ui/tsconfig.json
🚧 Files skipped from review as they are similar to previous changes (16)
  • test/ui/src/services/index.ts
  • test/ui/.prettierrc
  • test/ui/package.json
  • test/ui/src/constants/index.ts
  • test/ui/src/global-setup.ts
  • test/ui/src/utils/index.ts
  • test/ui/tsconfig.json
  • test/ui/eslint.config.mjs
  • test/ui/src/tests/common/smoke.spec.ts
  • test/ui/src/auth.setup.ts
  • test/ui/playwright.config.ts
  • test/ui/.prettierignore
  • .github/dependabot.yml
  • test/ui/src/fixtures/hypershift-test.ts
  • test/ui/src/config/index.ts
  • test/ui/src/utils/kube-helper.ts

Comment thread test/ui/README.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/ui/src/services/OcCliService.ts`:
- Around line 54-56: Increase the default timeout in OcCliService.run so it
exceeds the 60-second cleanup timeout passed to oc, preventing execFilePromise
from terminating the command at the same deadline. Keep explicit timeoutMs
overrides working unchanged.
- Around line 78-89: Update OcCliService.getConsoleUrl to validate that the host
returned by the console route query is non-empty before constructing the URL.
Throw a descriptive error when the result is missing, while preserving the
existing https URL construction for valid hosts.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: b00778f5-9a0e-4423-b4ff-d738cb868281

📥 Commits

Reviewing files that changed from the base of the PR and between 212c656 and 6b5be41.

⛔ Files ignored due to path filters (1)
  • test/ui/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (21)
  • .github/dependabot.yml
  • Makefile
  • test/ui/.env.example
  • test/ui/.gitignore
  • test/ui/.prettierignore
  • test/ui/.prettierrc
  • test/ui/README.md
  • test/ui/eslint.config.mjs
  • test/ui/package.json
  • test/ui/playwright.config.ts
  • test/ui/src/auth.setup.ts
  • test/ui/src/config/index.ts
  • test/ui/src/constants/index.ts
  • test/ui/src/fixtures/hypershift-test.ts
  • test/ui/src/global-setup.ts
  • test/ui/src/services/OcCliService.ts
  • test/ui/src/services/index.ts
  • test/ui/src/tests/common/smoke.spec.ts
  • test/ui/src/utils/index.ts
  • test/ui/src/utils/kube-helper.ts
  • test/ui/tsconfig.json
🚧 Files skipped from review as they are similar to previous changes (16)
  • test/ui/.prettierrc
  • test/ui/src/constants/index.ts
  • test/ui/.gitignore
  • .github/dependabot.yml
  • test/ui/src/utils/index.ts
  • test/ui/package.json
  • test/ui/src/services/index.ts
  • test/ui/eslint.config.mjs
  • test/ui/playwright.config.ts
  • test/ui/src/global-setup.ts
  • test/ui/tsconfig.json
  • test/ui/src/auth.setup.ts
  • test/ui/src/tests/common/smoke.spec.ts
  • test/ui/src/utils/kube-helper.ts
  • test/ui/src/fixtures/hypershift-test.ts
  • test/ui/src/config/index.ts

Comment thread test/ui/src/services/OcCliService.ts Outdated
Comment thread test/ui/src/services/OcCliService.ts
Setting up Playwright UI E2E infratructure:
- StorageState authentication (saves .auth/admin.json)
- Basic smoke tests (auth, console loading, MCE detection)
- TypeScript with path aliases and console-e2e dependency

Signed-off-by: George Lipceanu <glipcean@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/testing Indicates the PR includes changes for e2e testing do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants