Skip to content

CONSOLE-5235: Migrate basic app Cypress e2e tests to Playwright#16431

Open
stefanonardo wants to merge 1 commit into
openshift:mainfrom
stefanonardo:CONSOLE-5235
Open

CONSOLE-5235: Migrate basic app Cypress e2e tests to Playwright#16431
stefanonardo wants to merge 1 commit into
openshift:mainfrom
stefanonardo:CONSOLE-5235

Conversation

@stefanonardo

@stefanonardo stefanonardo commented May 12, 2026

Copy link
Copy Markdown
Contributor

Analysis / Root cause:
CONSOLE-5235 — Migrate 6 Cypress test files (21 tests) from packages/integration-tests/tests/app/ to Playwright as part of the OCP 5.0 Playwright migration effort (CONSOLE-5196).

Solution description:
Migrated all 6 basic app Cypress test files to idiomatic Playwright:

Cypress file Playwright spec Tests
masthead.cy.ts masthead.spec.ts 6
overview.cy.ts overview.spec.ts 2
node-terminal.cy.ts node-terminal.spec.ts 1
resource-log.cy.ts resource-log.spec.ts 3
template.cy.ts template.spec.ts 1
filtering-and-searching.cy.ts filtering-and-searching.spec.ts 8

New page objects (reusable across future migrations):

  • ListPage — DataView table, filtering by name, row assertions
  • DetailsPage — resource details loading, tab navigation, kebab actions (merged with upstream additions)
  • LogsPage — log viewer options, wrap toggle, container select, search
  • CatalogPage — catalog filtering, item/icon assertions
  • MastheadPage — logo, quick create, user dropdown
  • OverviewPage — cluster overview + topology list view, sidebar (merged with upstream additions)

KubernetesClient extensions: createPod, deletePod, waitForPodReady (with container readiness check), createDeployment, waitForDeploymentReady

Key translation decisions:

  • Replaced all cy.exec('oc ...') with KubernetesClient API calls
  • Replaced cy.login()/cy.initAdmin() with storageState auth
  • Replaced cy.wait(ms) with condition-based assertions
  • Each test is self-contained with proper cleanup via cleanup.trackNamespace()
  • All selectors verified against live cluster UI via Playwright MCP
  • Used Partial<V1Pod> / Partial<V1Deployment> types to avoid unsafe as any casts
  • Template test uses unique name (Date.now()) to prevent collisions

Fixes to existing cluster-settings tests:

Tests that use page.route() to mock Kubernetes API responses (e.g. ClusterVersion, MachineConfigPool) were failing because the console's watchK8sObject makes two requests per watched resource: an HTTP GET (intercepted by page.route()) and a WebSocket watch (not intercepted). The WebSocket delivered real cluster data that overwrote the mocked GET response in the Redux store.

Fix: Added page.routeWebSocket(pattern, () => {}) calls alongside the existing page.route() mocks. When the handler doesn't call connectToServer(), Playwright creates a mock WebSocket that appears open to the page but never delivers server messages. The URL patterns are specific (e.g. /apis\/config\.openshift\.io\/v1\/clusterversions/), so only matching WebSocket connections are intercepted — all other WebSockets pass through normally.

In update-modal.spec.ts, the previous 45-line stubMachineConfigPoolWebSocket() function used page.addInitScript() to monkey-patch the global WebSocket constructor. This was replaced with two idiomatic one-liners using page.routeWebSocket() (available since Playwright 1.48; project uses 1.59+), which provides the same selective interception behavior without modifying global browser state.

Affected files: channel-modal.spec.ts, update-in-progress.spec.ts, upgradeable-false.spec.ts, updates-graph.spec.ts, update-modal.spec.ts, worker-mcp-paused.spec.ts.

Additional page object fixes:

  • overview-page.ts: Fixed labelCell() — the .odc-topology-list-view__label-cell element contains both the kind badge prefix (e.g. "DaemonSetD") and the resource name, so the regex ^name$ never matched. Changed to substring match.
  • catalog-page.ts: Fixed catalogItemIcon() — PatternFly's CatalogTile renders <img alt="">, which per ARIA spec has role="presentation", so getByRole('img') correctly skips it. Changed to CSS selector img.catalog-tile-pf-icon.

Screenshots / screen recording:

Test setup:
Requires a running OpenShift cluster. Configure frontend/e2e/.env with cluster credentials, then run:

cd frontend
npx playwright test --project=console tests/console/app/

Test cases:

  • All 21 migrated tests pass against a live cluster with --retries=0
  • Tests verified stable across 3 consecutive runs
  • Original Cypress test files deleted after validation
  • Exclusive Cypress dependencies deleted (views/logs.ts, views/catalogs.ts, views/overview.ts, fixture YAMLs)
  • TypeScript type check passes (npx tsc --noEmit)
  • ESLint passes on all files including eslint-plugin-playwright rules

Browser conformance:

  • Chrome (Playwright Chromium)
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests

    • Expanded end-to-end coverage for catalog, overview, logs, masthead, node terminal, pod logs, templates, and cluster settings; added many Playwright specs and page-object helpers.
    • Migrated integration tests from Cypress to Playwright and improved WebSocket handling for stable mocked scenarios.
  • Chores

    • Updated testing utilities, fixtures, and test selectors to support the new Playwright flows.
  • Documentation

    • Clarified Playwright test isolation and migration guidance.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 12, 2026
@openshift-ci-robot

openshift-ci-robot commented May 12, 2026

Copy link
Copy Markdown
Contributor

@stefanonardo: This pull request references CONSOLE-5235 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 story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Analysis / Root cause:
CONSOLE-5235 — Migrate 6 Cypress test files (21 tests) from packages/integration-tests/tests/app/ to Playwright as part of the OCP 5.0 Playwright migration effort (CONSOLE-5196).

Solution description:
Migrated all 6 basic app Cypress test files to idiomatic Playwright:

Cypress file Playwright spec Tests
masthead.cy.ts masthead.spec.ts 6
overview.cy.ts overview.spec.ts 2
node-terminal.cy.ts node-terminal.spec.ts 1
resource-log.cy.ts resource-log.spec.ts 3
template.cy.ts template.spec.ts 1
filtering-and-searching.cy.ts filtering-and-searching.spec.ts 8

New page objects (reusable across future migrations):

  • ListPage — DataView table, filtering by name, row assertions
  • DetailsPage — resource details loading, tab navigation
  • LogsPage — log viewer options, wrap toggle, container select, search
  • CatalogPage — catalog filtering, item/icon assertions
  • MastheadPage — logo, quick create, user dropdown
  • OverviewPage — topology list view, sidebar

KubernetesClient extensions: createPod, deletePod, waitForPodReady, createDeployment, waitForDeploymentReady

Key translation decisions:

  • Replaced all cy.exec('oc ...') with KubernetesClient API calls
  • Replaced cy.login()/cy.initAdmin() with storageState auth
  • Replaced cy.wait(ms) with condition-based assertions
  • Each test is self-contained with proper cleanup via cleanup.trackNamespace()
  • All selectors verified against live cluster UI via Playwright MCP

Screenshots / screen recording:

Test setup:
Requires a running OpenShift cluster. Configure frontend/e2e/.env with cluster credentials, then run:

cd frontend
npx playwright test --project=console tests/console/app/

Test cases:

  • All 21 migrated tests pass against a live cluster with --retries=0
  • Original Cypress test files deleted after validation
  • Exclusive Cypress dependencies deleted (views/logs.ts, views/catalogs.ts, views/overview.ts, fixture YAMLs)
  • TypeScript type check passes (npx tsc --noEmit)
  • ESLint passes on all new/modified files

Browser conformance:

  • Chrome (Playwright Chromium)
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:

🤖 Generated with Claude Code

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 openshift-ci Bot requested review from TheRealJon and jhadvig May 12, 2026 07:24
@openshift-ci openshift-ci Bot added the kind/cypress Related to Cypress e2e integration testing label May 12, 2026
@coderabbitai

coderabbitai Bot commented May 12, 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

Converts Cypress-based E2E to Playwright: adds KubernetesClient readiness helpers, BasePage retry, six Playwright page-objects, many Playwright specs (with setup/teardown and WebSocket routing), config/selector updates, docs/skill edits, and removes legacy Cypress artifacts.

Changes

Playwright E2E migration

Layer / File(s) Summary
KubernetesClient pod/deployment helpers
frontend/e2e/clients/kubernetes-client.ts
Adds waitForPodReady, createDeployment, and waitForDeploymentReady for test orchestration and readiness polling.
BasePage retry helper
frontend/e2e/pages/base-page.ts
Adds protected retryOnError() to reload page and await loading completion.
Playwright page-objects
frontend/e2e/pages/* (Catalog, Details, List, Logs, Masthead, Overview)
Introduces CatalogPage, DetailsPage updates, ListPage, LogsPage, MastheadPage, OverviewPage with locators and navigation/helper methods used by tests.
New Playwright specs
frontend/e2e/tests/console/app/*
Adds multiple Playwright suites: filtering-and-searching, masthead, node-terminal, overview, resource-log, template with setup/teardown and API-created fixtures.
Cluster-settings WebSocket routing
frontend/e2e/tests/console/cluster-settings/*
Replaces custom WebSocket stubs with Playwright page.routeWebSocket intercepts for clusterversion/MCP watch endpoints across related tests.
Playwright config & selectors
frontend/playwright.config.ts, frontend/public/components/utils/*
Removes per-test timeouts in config, sets testIdAttribute: 'data-test', and updates data-test attributes for SelectOption/ContainerSelect and resource-log controls.
Docs and debug skill update
.claude/migration-context.md, .claude/skills/debug-e2e/SKILL.md
Standardizes test isolation guidance, adds local-dev rebuild note, and renames debug skill to debug-e2e with updated examples.
Removed legacy Cypress helpers/fixtures
frontend/packages/integration-tests/...
Legacy Cypress tests, fixtures, and page-object helpers were deleted in favor of Playwright equivalents.

Sequence Diagram(s): none generated.

Estimated code review effort:
🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs:

Suggested reviewers:

  • spadgett
  • fsgreco
🚥 Pre-merge checks | ✅ 13 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Test Structure And Quality ❓ Inconclusive Custom check asks to review Ginkgo (Go) test code, but this PR contains only Playwright (TypeScript) tests. Check instructions are not applicable to the code being reviewed. Verify the custom check instructions match the codebase being reviewed. This PR migrates Cypress to Playwright tests, not Go/Ginkgo tests.
✅ Passed checks (13 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: migrating 6 Cypress e2e test files to Playwright as part of CONSOLE-5235.
Description check ✅ Passed The PR description comprehensively covers all required template sections with detailed analysis, solution, test setup, test cases, and browser conformance.
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 PR contains only Playwright (TypeScript) tests, not Ginkgo. Ginkgo-specific check is inapplicable. All test titles use static descriptive strings with dynamic values only in test bodies.
Microshift Test Compatibility ✅ Passed This PR adds only Playwright e2e tests, not Ginkgo e2e tests. The custom check applies to Ginkgo tests using It(), Describe() patterns, making it not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR adds only Playwright e2e tests (TypeScript/JavaScript frontend tests), not Ginkgo tests. The custom check applies only to Ginkgo e2e tests (Go), making it not applicable to this PR.
Topology-Aware Scheduling Compatibility ✅ Passed PR is purely a Cypress-to-Playwright test migration with no deployment manifests, operator code, or scheduling constraints that assume HA topology.
Ote Binary Stdout Contract ✅ Passed OTE Binary Stdout Contract check is for Go binaries only. This PR modifies only TypeScript/JavaScript Playwright tests, YAML fixtures, and documentation—no Go files were changed.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR contains only Playwright (TypeScript) e2e tests, not Ginkgo (Go) tests; IPv6/disconnected compatibility check is not applicable.
No-Weak-Crypto ✅ Passed PR adds Playwright test code with no cryptographic operations—no weak crypto (MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB), custom crypto implementations, or insecure secret comparisons detected.
Container-Privileges ✅ Passed No privileged containers found; all K8s manifests have hardened securityContext with runAsNonRoot, dropped capabilities, and RuntimeDefault seccomp.
No-Sensitive-Data-In-Logs ✅ Passed No sensitive data (passwords, tokens, API keys, PII) is logged. Credentials handled safely without console output and error messages don't expose sensitive information.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@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: 6

🧹 Nitpick comments (6)
frontend/e2e/pages/catalog-page.ts (1)

6-8: ⚡ Quick win

Use the stable data-test attribute for the keyword filter input.

The underlying SearchInput component (CatalogToolbar.tsx) provides data-test="search-catalog". Update the selector from 'input[placeholder*="Filter by keyword"]' to this.page.getByTestId('search-catalog') to avoid brittleness from placeholder text changes and i18n updates. Aligns with the existing pattern used in catalogItem(testId) on line 19.

🤖 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 `@frontend/e2e/pages/catalog-page.ts` around lines 6 - 8, Replace the brittle
placeholder-based locator for the keyword filter by updating the private field
filterInput (type Locator) to use the stable test id selector: use
this.page.getByTestId('search-catalog') instead of 'input[placeholder*="Filter
by keyword"]' so the CatalogToolbar's data-test="search-catalog" is targeted
like catalogItem(testId) does.
frontend/e2e/tests/console/app/masthead.spec.ts (1)

58-67: ⚡ Quick win

Add a post-logout assertion to avoid false positives.

The test currently validates only clicks. Please assert an observable logout outcome (URL/login screen/auth redirect) after Line 67.

🤖 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 `@frontend/e2e/tests/console/app/masthead.spec.ts` around lines 58 - 67, The
test only performs clicks and can falsely pass; after calling
MastheadPage.clickLogOut() add a concrete post-logout assertion: if using
URL-based redirect, await page.waitForURL(...) or expect(page).toHaveURL(...)
for the login or landing path; alternatively assert a login-related UI element
via MastheadPage (e.g., expect(masthead.loginButton).toBeVisible() or
expect(masthead.isAuthenticated()).resolves.toBe(false)). Use the existing
MastheadPage helpers (isAuthDisabled, openUserDropdown, clickLogOut) and add the
appropriate await/expect to verify the app reached the logged-out state.
frontend/e2e/tests/console/app/filtering-and-searching.spec.ts (1)

27-55: ⚡ Quick win

Drop as any for the deployment body.

Line 54 removes compile-time guarantees for your setup manifest. Prefer a typed value using satisfies against createDeployment input.

Suggested fix
-    await client.createDeployment(ns, {
+    const deployment = {
       apiVersion: 'apps/v1',
       kind: 'Deployment',
       metadata: {
         name: workloadName,
         labels: { 'lbl-filter': ns, app: 'name' },
       },
       spec: {
         replicas: 3,
         selector: { matchLabels: { app: 'name' } },
         template: {
           metadata: { labels: { app: 'name' } },
           spec: {
             securityContext: { runAsNonRoot: true, seccompProfile: { type: 'RuntimeDefault' } },
             containers: [
               {
                 name: 'httpd',
                 image: 'image-registry.openshift-image-registry.svc:5000/openshift/httpd:latest',
                 securityContext: {
                   allowPrivilegeEscalation: false,
                   capabilities: { drop: ['ALL'] },
                 },
               },
             ],
           },
         },
       },
-    } as any);
+    } satisfies Parameters<KubernetesClient['createDeployment']>[1];
+    await client.createDeployment(ns, deployment);

As per coding guidelines: “Avoid using any type; flag use of any type and suggest proper type definitions”.

🤖 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 `@frontend/e2e/tests/console/app/filtering-and-searching.spec.ts` around lines
27 - 55, Remove the unsafe "as any" cast on the deployment manifest and instead
satisfy the actual parameter type expected by client.createDeployment; replace
the trailing "as any" with "satisfies Parameters<typeof
client.createDeployment>[1]" (or the concrete input type for createDeployment)
so the manifest literal (the object passed to client.createDeployment in the
test) is type-checked, keeping the rest of the call to
client.waitForDeploymentReady(workloadName, ns) unchanged.
frontend/e2e/pages/masthead-page.ts (1)

33-35: ⚡ Quick win

Replace any in isAuthDisabled with a narrow window type.

Line 34 can be fully typed without any, keeping strict checks intact.

Suggested fix
 async isAuthDisabled(): Promise<boolean> {
-  return this.page.evaluate(() => !!(window as any).SERVER_FLAGS?.authDisabled);
+  return this.page.evaluate(() => {
+    const flags = (window as Window & { SERVER_FLAGS?: { authDisabled?: boolean } }).SERVER_FLAGS;
+    return Boolean(flags?.authDisabled);
+  });
 }

As per coding guidelines: “Avoid using any type; flag use of any type and suggest proper type definitions”.

🤖 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 `@frontend/e2e/pages/masthead-page.ts` around lines 33 - 35, The isAuthDisabled
method uses (window as any) which bypasses typings; replace it with a narrow
Window interface that includes optional SERVER_FLAGS with authDisabled and use
that type in the page.evaluate callback. Add a local type or interface like
interface WindowWithServerFlags { SERVER_FLAGS?: { authDisabled?: boolean } }
and then change the evaluate body to cast window to WindowWithServerFlags (or
declare it in the callback signature) so the expression becomes
!!(windowAsTyped.SERVER_FLAGS?.authDisabled) while removing any usage; update
the function isAuthDisabled to use that typed window reference.
frontend/e2e/pages/logs-page.ts (1)

16-18: ⚡ Quick win

Use stable test IDs instead of placeholder/class-based locators

Line 16-18 rely on a localized placeholder and CSS classes, which are brittle for long-term e2e stability. Prefer data-test-backed locators for these elements as well.

As per coding guidelines: **/*.{tsx,ts}: Prefer data-test attributes for Cypress selectors ... over brittle CSS or ARIA selectors.

🤖 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 `@frontend/e2e/pages/logs-page.ts` around lines 16 - 18, Replace brittle
locators in logs-page.ts with data-test-backed selectors: update the Locator
definitions searchInput, searchMatches, and logText to use stable data-test
attributes (e.g., page.locator('[data-test="logs-search"]'),
page.locator('[data-test="logs-match"]'),
page.locator('[data-test="log-text"]')) instead of the placeholder or
class-based selectors, and ensure the corresponding components/templates include
those data-test attributes so the tests can target them reliably.
frontend/e2e/tests/console/app/resource-log.spec.ts (1)

92-92: ⚡ Quick win

Drop as any for Pod specs to preserve type safety

Line 92, 126, and 127 cast Pod specs to any, which hides schema mistakes in test fixtures. Please use a concrete k8s resource type for these objects.

As per coding guidelines: **/*.{ts,tsx}: Avoid using any type; flag use of any type and suggest proper type definitions.

Also applies to: 126-127

🤖 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 `@frontend/e2e/tests/console/app/resource-log.spec.ts` at line 92, The test is
casting Pod fixtures to any (examplePodSpec) before calling k8sClient.createPod
which loses type safety; replace the `as any` casts by typing the fixture
objects with the concrete Kubernetes Pod type used by your k8s client (e.g.,
V1Pod or the client's PodManifest type), import that type at the top, update
examplePodSpec (and the other pod spec variables used around createPod) to match
that interface, and pass them directly to k8sClient.createPod so the compiler
validates the Pod schema instead of using `any`.
🤖 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 @.claude/skills/migrate-cypress/SKILL.md:
- Around line 79-81: Update the selector examples to match the Selector
Unification rule by replacing occurrences of the legacy attribute `data-test-id`
with the unified `data-test` in the SKILL.md examples; specifically change the
locator initialization referenced by the symbol detailsTab (the
this.page.locator('[data-test-id="horizontal-link-Details"]')) and the other
example block around the second occurrence (lines shown in the review) so both
examples use '[data-test="horizontal-link-Details"]' and analogous selectors to
keep the documentation consistent.
- Around line 24-28: Update the fenced code blocks in SKILL.md so they declare a
language (e.g., add "text" after the opening ```), specifically for the
migration command block containing the lines starting with "/migrate-cypress
..." and the corresponding output block showing "Migration complete:
<source-file> → <output-file>" (also apply the same change to the second
occurrence around lines 106-113); open each triple-backtick fence and change ```
to ```text so markdownlint MD040 warnings are resolved.

In `@frontend/e2e/clients/kubernetes-client.ts`:
- Around line 489-495: The waitForPodReady function currently only checks
pod.status.phase === 'Running' and can return before containers are actually
ready; update the poll predicate in waitForPodReady to fetch the pod via
this.k8sApi.readNamespacedPod and then verify readiness by (a) confirming
status.phase === 'Running' and (b) ensuring either all status.containerStatuses
exist and every containerStatus.ready === true OR that pod.status.conditions
contains a condition with type === 'Ready' and status === 'True'; handle missing
fields defensively (treat absent containerStatuses/conditions as not ready) and
keep the existing timeout/polling behavior so callers of waitForPodReady get a
true only when the pod is actually ready.

In `@frontend/e2e/pages/list-page.ts`:
- Around line 54-60: The clickFirstRowLinkMatching method can misbehave if
callers pass a RegExp with global or sticky flags because RegExp.lastIndex is
stateful; defensively create a fresh RegExp without the g or y flags from the
incoming pattern before the loop (use pattern.source and pattern.flags filtered
to remove 'g' and 'y') and then use that new RegExp for matching inside the
loop, keeping the rest of the logic (including robustClick) unchanged.

In `@frontend/e2e/tests/console/app/resource-log.spec.ts`:
- Line 65: The test uses absolute paths in page.goto (e.g.
page.goto('/k8s/ns/openshift-kube-apiserver/core~v1~Pod')) which breaks behind
non-root proxy; replace these calls with the base-path-safe routing helper used
elsewhere (for example a getConsoleRoute or buildConsoleUrl helper) so the path
is prefixed by the app's base path, and update each occurrence of
page.goto('/k8s/...') in resource-log.spec.ts to call that helper (e.g. await
page.goto(getConsoleRoute('k8s/ns/openshift-kube-apiserver/core~v1~Pod'))) so
tests work when Console is hosted under a non-root path.

In `@frontend/e2e/tests/console/app/template.spec.ts`:
- Line 4: The test uses a fixed constant TEMPLATE_NAME ('httpd-example-test')
causing collisions; update the spec (template.spec.ts) to generate a unique
template name at runtime (e.g., append a timestamp or UUID) and replace the
constant TEMPLATE_NAME with that dynamic value so each run uses a distinct name;
ensure the generated name is used wherever TEMPLATE_NAME is referenced in the
test so creation calls no longer clash with existing resources.

---

Nitpick comments:
In `@frontend/e2e/pages/catalog-page.ts`:
- Around line 6-8: Replace the brittle placeholder-based locator for the keyword
filter by updating the private field filterInput (type Locator) to use the
stable test id selector: use this.page.getByTestId('search-catalog') instead of
'input[placeholder*="Filter by keyword"]' so the CatalogToolbar's
data-test="search-catalog" is targeted like catalogItem(testId) does.

In `@frontend/e2e/pages/logs-page.ts`:
- Around line 16-18: Replace brittle locators in logs-page.ts with
data-test-backed selectors: update the Locator definitions searchInput,
searchMatches, and logText to use stable data-test attributes (e.g.,
page.locator('[data-test="logs-search"]'),
page.locator('[data-test="logs-match"]'),
page.locator('[data-test="log-text"]')) instead of the placeholder or
class-based selectors, and ensure the corresponding components/templates include
those data-test attributes so the tests can target them reliably.

In `@frontend/e2e/pages/masthead-page.ts`:
- Around line 33-35: The isAuthDisabled method uses (window as any) which
bypasses typings; replace it with a narrow Window interface that includes
optional SERVER_FLAGS with authDisabled and use that type in the page.evaluate
callback. Add a local type or interface like interface WindowWithServerFlags {
SERVER_FLAGS?: { authDisabled?: boolean } } and then change the evaluate body to
cast window to WindowWithServerFlags (or declare it in the callback signature)
so the expression becomes !!(windowAsTyped.SERVER_FLAGS?.authDisabled) while
removing any usage; update the function isAuthDisabled to use that typed window
reference.

In `@frontend/e2e/tests/console/app/filtering-and-searching.spec.ts`:
- Around line 27-55: Remove the unsafe "as any" cast on the deployment manifest
and instead satisfy the actual parameter type expected by
client.createDeployment; replace the trailing "as any" with "satisfies
Parameters<typeof client.createDeployment>[1]" (or the concrete input type for
createDeployment) so the manifest literal (the object passed to
client.createDeployment in the test) is type-checked, keeping the rest of the
call to client.waitForDeploymentReady(workloadName, ns) unchanged.

In `@frontend/e2e/tests/console/app/masthead.spec.ts`:
- Around line 58-67: The test only performs clicks and can falsely pass; after
calling MastheadPage.clickLogOut() add a concrete post-logout assertion: if
using URL-based redirect, await page.waitForURL(...) or
expect(page).toHaveURL(...) for the login or landing path; alternatively assert
a login-related UI element via MastheadPage (e.g.,
expect(masthead.loginButton).toBeVisible() or
expect(masthead.isAuthenticated()).resolves.toBe(false)). Use the existing
MastheadPage helpers (isAuthDisabled, openUserDropdown, clickLogOut) and add the
appropriate await/expect to verify the app reached the logged-out state.

In `@frontend/e2e/tests/console/app/resource-log.spec.ts`:
- Line 92: The test is casting Pod fixtures to any (examplePodSpec) before
calling k8sClient.createPod which loses type safety; replace the `as any` casts
by typing the fixture objects with the concrete Kubernetes Pod type used by your
k8s client (e.g., V1Pod or the client's PodManifest type), import that type at
the top, update examplePodSpec (and the other pod spec variables used around
createPod) to match that interface, and pass them directly to
k8sClient.createPod so the compiler validates the Pod schema instead of using
`any`.
🪄 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: 863a79dc-002d-49da-ba01-806f799f3415

📥 Commits

Reviewing files that changed from the base of the PR and between cd0749d and 06b20a5.

📒 Files selected for processing (30)
  • .claude/migration-context.md
  • .claude/skills/debug-test/SKILL.md
  • .claude/skills/migrate-cypress/SKILL.md
  • .gitignore
  • AGENTS.md
  • frontend/e2e/clients/kubernetes-client.ts
  • frontend/e2e/pages/catalog-page.ts
  • frontend/e2e/pages/details-page.ts
  • frontend/e2e/pages/list-page.ts
  • frontend/e2e/pages/logs-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/pages/overview-page.ts
  • frontend/e2e/tests/console/app/filtering-and-searching.spec.ts
  • frontend/e2e/tests/console/app/masthead.spec.ts
  • frontend/e2e/tests/console/app/node-terminal.spec.ts
  • frontend/e2e/tests/console/app/overview.spec.ts
  • frontend/e2e/tests/console/app/resource-log.spec.ts
  • frontend/e2e/tests/console/app/template.spec.ts
  • frontend/packages/integration-tests/fixtures/httpd-example-template.yaml
  • frontend/packages/integration-tests/fixtures/pod-with-space.yaml
  • frontend/packages/integration-tests/fixtures/pod-with-wrap-annotation.yaml
  • frontend/packages/integration-tests/tests/app/filtering-and-searching.cy.ts
  • frontend/packages/integration-tests/tests/app/masthead.cy.ts
  • frontend/packages/integration-tests/tests/app/node-terminal.cy.ts
  • frontend/packages/integration-tests/tests/app/overview.cy.ts
  • frontend/packages/integration-tests/tests/app/resource-log.cy.ts
  • frontend/packages/integration-tests/tests/app/template.cy.ts
  • frontend/packages/integration-tests/views/catalogs.ts
  • frontend/packages/integration-tests/views/logs.ts
  • frontend/packages/integration-tests/views/overview.ts
💤 Files with no reviewable changes (12)
  • frontend/packages/integration-tests/tests/app/resource-log.cy.ts
  • frontend/packages/integration-tests/fixtures/pod-with-space.yaml
  • frontend/packages/integration-tests/fixtures/pod-with-wrap-annotation.yaml
  • frontend/packages/integration-tests/tests/app/overview.cy.ts
  • frontend/packages/integration-tests/views/overview.ts
  • frontend/packages/integration-tests/tests/app/node-terminal.cy.ts
  • frontend/packages/integration-tests/tests/app/template.cy.ts
  • frontend/packages/integration-tests/fixtures/httpd-example-template.yaml
  • frontend/packages/integration-tests/tests/app/filtering-and-searching.cy.ts
  • frontend/packages/integration-tests/views/catalogs.ts
  • frontend/packages/integration-tests/views/logs.ts
  • frontend/packages/integration-tests/tests/app/masthead.cy.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (10)
**/*.{tsx,ts}

📄 CodeRabbit inference engine (TESTING.md)

Prefer data-test attributes for Cypress selectors (e.g., cy.get('[data-test="create-deployment"]')) over brittle CSS or ARIA selectors

Files:

  • frontend/e2e/tests/console/app/template.spec.ts
  • frontend/e2e/tests/console/app/node-terminal.spec.ts
  • frontend/e2e/tests/console/app/masthead.spec.ts
  • frontend/e2e/pages/catalog-page.ts
  • frontend/e2e/pages/list-page.ts
  • frontend/e2e/tests/console/app/overview.spec.ts
  • frontend/e2e/pages/logs-page.ts
  • frontend/e2e/pages/details-page.ts
  • frontend/e2e/pages/overview-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/clients/kubernetes-client.ts
  • frontend/e2e/tests/console/app/filtering-and-searching.spec.ts
  • frontend/e2e/tests/console/app/resource-log.spec.ts
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (STYLEGUIDE.md)

Use lowercase dash-separated names for all files (to avoid git issues with case-insensitive file systems)

Files:

  • frontend/e2e/tests/console/app/template.spec.ts
  • frontend/e2e/tests/console/app/node-terminal.spec.ts
  • frontend/e2e/tests/console/app/masthead.spec.ts
  • frontend/e2e/pages/catalog-page.ts
  • frontend/e2e/pages/list-page.ts
  • frontend/e2e/tests/console/app/overview.spec.ts
  • frontend/e2e/pages/logs-page.ts
  • frontend/e2e/pages/details-page.ts
  • frontend/e2e/pages/overview-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/clients/kubernetes-client.ts
  • frontend/e2e/tests/console/app/filtering-and-searching.spec.ts
  • frontend/e2e/tests/console/app/resource-log.spec.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (STYLEGUIDE.md)

**/*.{ts,tsx}: Prefer functional programming patterns and immutable data structures
Run the linter and follow all rules defined in .eslintrc
Use React hooks and Context API for state management, migrating away from legacy Redux/Immutable.js
Use existing hooks from console-shared when possible (useK8sWatchResource, useUserSettings, etc.)
Use k8s resource hooks for data fetching, consoleFetchJSON for HTTP requests
Use console extension points for plugin integration
Check existing types in console-shared before creating new types
Use useTranslation('namespace') hook with key format for translation keys
Use useCallback to memoize callbacks and prevent unnecessary re-renders
Use useMemo for expensive filtering and computations to prevent re-renders
Avoid using any type; flag use of any type and suggest proper type definitions
Verify null/undefined are properly handled in type definitions (use string | undefined format)
Verify exported types for reusable components are properly defined
Use usePluginInfo hook for plugin data access
Avoid importing from deprecated component paths (check for /deprecated in import paths and @deprecated JSDoc tags)
Use direct imports to specific files instead of barrel exports from index.ts to avoid circular dependencies and improve build performance
Use import type for type-only imports to improve tree-shaking and build performance

Files:

  • frontend/e2e/tests/console/app/template.spec.ts
  • frontend/e2e/tests/console/app/node-terminal.spec.ts
  • frontend/e2e/tests/console/app/masthead.spec.ts
  • frontend/e2e/pages/catalog-page.ts
  • frontend/e2e/pages/list-page.ts
  • frontend/e2e/tests/console/app/overview.spec.ts
  • frontend/e2e/pages/logs-page.ts
  • frontend/e2e/pages/details-page.ts
  • frontend/e2e/pages/overview-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/clients/kubernetes-client.ts
  • frontend/e2e/tests/console/app/filtering-and-searching.spec.ts
  • frontend/e2e/tests/console/app/resource-log.spec.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (STYLEGUIDE.md)

Never use absolute paths in code; the app must be able to run behind a proxy under an arbitrary path

**/*.{ts,tsx,js,jsx}: Use i18next's TFunction inside functions or components, not in module scope
Don't use backticks inside of a TFunction call; use single quotes instead for template strings
For dynamic keys that cannot be interpolated by i18next-parser, specify possible static values in comments (e.g., // t('key_1')) to aid key generation

Files:

  • frontend/e2e/tests/console/app/template.spec.ts
  • frontend/e2e/tests/console/app/node-terminal.spec.ts
  • frontend/e2e/tests/console/app/masthead.spec.ts
  • frontend/e2e/pages/catalog-page.ts
  • frontend/e2e/pages/list-page.ts
  • frontend/e2e/tests/console/app/overview.spec.ts
  • frontend/e2e/pages/logs-page.ts
  • frontend/e2e/pages/details-page.ts
  • frontend/e2e/pages/overview-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/clients/kubernetes-client.ts
  • frontend/e2e/tests/console/app/filtering-and-searching.spec.ts
  • frontend/e2e/tests/console/app/resource-log.spec.ts
**/*.spec.{ts,tsx}

📄 CodeRabbit inference engine (STYLEGUIDE.md)

Tests should follow a table-driven tests convention similar to Go where applicable

Files:

  • frontend/e2e/tests/console/app/template.spec.ts
  • frontend/e2e/tests/console/app/node-terminal.spec.ts
  • frontend/e2e/tests/console/app/masthead.spec.ts
  • frontend/e2e/tests/console/app/overview.spec.ts
  • frontend/e2e/tests/console/app/filtering-and-searching.spec.ts
  • frontend/e2e/tests/console/app/resource-log.spec.ts
**/*.ts

📄 CodeRabbit inference engine (STYLEGUIDE.md)

Updates to console-dynamic-plugin-sdk should maintain backward compatibility as it's a public API; use the plugin-api-review skill to vet changes for public API impact

Files:

  • frontend/e2e/tests/console/app/template.spec.ts
  • frontend/e2e/tests/console/app/node-terminal.spec.ts
  • frontend/e2e/tests/console/app/masthead.spec.ts
  • frontend/e2e/pages/catalog-page.ts
  • frontend/e2e/pages/list-page.ts
  • frontend/e2e/tests/console/app/overview.spec.ts
  • frontend/e2e/pages/logs-page.ts
  • frontend/e2e/pages/details-page.ts
  • frontend/e2e/pages/overview-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/clients/kubernetes-client.ts
  • frontend/e2e/tests/console/app/filtering-and-searching.spec.ts
  • frontend/e2e/tests/console/app/resource-log.spec.ts
**/*

📄 CodeRabbit inference engine (STYLEGUIDE.md)

Use lowercase dash-separated names for all files and directories, with exceptions for files with their own naming conventions (Dockerfile, Makefile, README, etc.)

Files:

  • frontend/e2e/tests/console/app/template.spec.ts
  • frontend/e2e/tests/console/app/node-terminal.spec.ts
  • frontend/e2e/tests/console/app/masthead.spec.ts
  • frontend/e2e/pages/catalog-page.ts
  • frontend/e2e/pages/list-page.ts
  • frontend/e2e/tests/console/app/overview.spec.ts
  • AGENTS.md
  • frontend/e2e/pages/logs-page.ts
  • frontend/e2e/pages/details-page.ts
  • frontend/e2e/pages/overview-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/clients/kubernetes-client.ts
  • frontend/e2e/tests/console/app/filtering-and-searching.spec.ts
  • frontend/e2e/tests/console/app/resource-log.spec.ts
**/*.{ts,tsx,jsx}

📄 CodeRabbit inference engine (INTERNATIONALIZATION.md)

**/*.{ts,tsx,jsx}: Internationalize aria-label, aria-placeholder, aria-roledescription, and aria-valuetext attributes
When displaying a resource kind, use the predefined model.labelPluralKey wrapped in TFunction if available, otherwise fall back to model.labelPlural
Use the i18nKey property on react-i18next Trans component only as a last resort when the parser generates incorrect keys with HTML tags

Files:

  • frontend/e2e/tests/console/app/template.spec.ts
  • frontend/e2e/tests/console/app/node-terminal.spec.ts
  • frontend/e2e/tests/console/app/masthead.spec.ts
  • frontend/e2e/pages/catalog-page.ts
  • frontend/e2e/pages/list-page.ts
  • frontend/e2e/tests/console/app/overview.spec.ts
  • frontend/e2e/pages/logs-page.ts
  • frontend/e2e/pages/details-page.ts
  • frontend/e2e/pages/overview-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/clients/kubernetes-client.ts
  • frontend/e2e/tests/console/app/filtering-and-searching.spec.ts
  • frontend/e2e/tests/console/app/resource-log.spec.ts
**/*.ts?(x)

📄 CodeRabbit inference engine (AGENTS.md)

Never import from package index files (e.g., @console/shared) in new code; import from specific file paths instead to avoid circular dependencies and slow builds

Ensure all $codeRef in extension points ALWAYS reference the corresponding extension type from the dynamic plugin SDK package (@console/dynamic-plugin-sdk/src/extensions/) for type safety

Never use template literals (backticks) in t() i18n calls; use single or double quotes instead as the i18n parser cannot extract keys from template literals

Never import from or use code with the @deprecated TSdoc tag in new code

Never use absolute URLs or paths; the console runs behind a proxy under an arbitrary path

After adding or modifying user-facing strings, run yarn i18n to update i18n keys and commit updated keys alongside code changes that affect i18n

Files:

  • frontend/e2e/tests/console/app/template.spec.ts
  • frontend/e2e/tests/console/app/node-terminal.spec.ts
  • frontend/e2e/tests/console/app/masthead.spec.ts
  • frontend/e2e/pages/catalog-page.ts
  • frontend/e2e/pages/list-page.ts
  • frontend/e2e/tests/console/app/overview.spec.ts
  • frontend/e2e/pages/logs-page.ts
  • frontend/e2e/pages/details-page.ts
  • frontend/e2e/pages/overview-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/clients/kubernetes-client.ts
  • frontend/e2e/tests/console/app/filtering-and-searching.spec.ts
  • frontend/e2e/tests/console/app/resource-log.spec.ts
AGENTS.md

📄 CodeRabbit inference engine (CLAUDE.md)

Document agent capabilities and behavior in AGENTS.md

Files:

  • AGENTS.md
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: openshift/console

Timestamp: 2026-05-12T07:24:22.768Z
Learning: Before starting ANY changes to the dynamic plugin SDK, ensure changes do not impact the public API by checking `frontend/packages/console-dynamic-plugin-sdk/src/api/internal-*.ts` files to avoid breakage of external plugins
Learnt from: CR
Repo: openshift/console

Timestamp: 2026-05-12T07:24:22.768Z
Learning: Always consider impact on external plugin developers when making changes to the dynamic plugin SDK, maintain backward compatibility, provide comprehensive documentation for all public APIs, and ensure changes to extension schemas include migration paths
Learnt from: CR
Repo: openshift/console

Timestamp: 2026-05-12T07:24:22.768Z
Learning: Use the `plugin-api-review` skill for all changes to the dynamic plugin SDK public API to ensure proper vetting and prevent breaking changes
Learnt from: CR
Repo: openshift/console

Timestamp: 2026-05-12T07:24:22.768Z
Learning: Backend dependency updates should be in separate commits from core logic changes to isolate vendor folder changes
Learnt from: CR
Repo: openshift/console

Timestamp: 2026-05-12T07:24:22.768Z
Learning: Bug fix commits should be prefixed with bug number or Jira key (e.g., `OCPBUGS-1234: Fix ...`); commit subject line answers 'what changed' and body answers 'why'
Learnt from: CR
Repo: openshift/console

Timestamp: 2026-05-12T07:24:22.768Z
Learning: When opening a PR, fill out the PR template located in `docs/pull_request_template.md` with all required sections and always link to the relevant JIRA issue in the PR title and description
Learnt from: CR
Repo: openshift/console

Timestamp: 2026-05-12T07:24:22.768Z
Learning: Feature work branches should be named with `CONSOLE-####` (Jira story number); bug fix branches should be named with `OCPBUGS-####` (Jira bug number); use `main` as base branch
Learnt from: CR
Repo: openshift/console

Timestamp: 2026-05-12T07:24:22.768Z
Learning: Use `/migrate-cypress` to convert Cypress e2e tests to Playwright and `/debug-test` to fix failing tests during the Cypress to Playwright migration
🪛 LanguageTool
.claude/skills/debug-test/SKILL.md

[style] ~100-~100: The adverb ‘sometimes’ is usually put before the verb ‘passes’.
Context: ...structure setup first. ### Flaky test (passes sometimes, fails sometimes) If a test passes on r...

(ADVERB_WORD_ORDER)


[style] ~100-~100: The adverb ‘sometimes’ is usually put before the verb ‘fails’.
Context: ...rst. ### Flaky test (passes sometimes, fails sometimes) If a test passes on re-run without any...

(ADVERB_WORD_ORDER)

🪛 markdownlint-cli2 (0.22.1)
.claude/skills/migrate-cypress/SKILL.md

[warning] 24-24: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 106-106: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (1)
frontend/e2e/tests/console/app/resource-log.spec.ts (1)

58-157: Solid migration test flow and cleanup discipline

Good use of test.step, namespace isolation, readiness waits, and cleanup tracking. This is a strong Playwright translation pattern for cluster-backed e2e coverage.

Comment thread .claude/skills/migrate-cypress/SKILL.md
Comment thread .claude/skills/migrate-cypress/SKILL.md Outdated
Comment thread frontend/e2e/clients/kubernetes-client.ts
Comment thread frontend/e2e/pages/list-page.ts
Comment thread frontend/e2e/tests/console/app/resource-log.spec.ts
Comment thread frontend/e2e/tests/console/app/template.spec.ts Outdated
@stefanonardo stefanonardo force-pushed the CONSOLE-5235 branch 4 times, most recently from 42ef523 to 8810a34 Compare May 14, 2026 10:31
@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 17, 2026
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 18, 2026
@openshift-ci openshift-ci Bot added the component/core Related to console core functionality label May 18, 2026
@stefanonardo stefanonardo force-pushed the CONSOLE-5235 branch 4 times, most recently from fddfc04 to b2d42e0 Compare May 19, 2026 09:49
@stefanonardo

Copy link
Copy Markdown
Contributor Author

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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

🧹 Nitpick comments (1)
frontend/e2e/pages/masthead-page.ts (1)

19-24: ⚡ Quick win

Use robustClick() consistently for masthead interactions.

Line 22, Line 33, Line 38, and Line 53 use direct .click(). In these menu/dropdown flows, using robustClick() consistently will better absorb transient overlays/re-renders and reduce flake.

As per coding guidelines frontend/e2e/pages/**/*.ts: Extend BasePage in Playwright page objects which provides robustClick(), waitForLoadingComplete(), and goTo().

Also applies to: 26-35, 37-39, 48-54

🤖 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 `@frontend/e2e/pages/masthead-page.ts` around lines 19 - 24, The page object
should extend BasePage and use its robustClick helper rather than direct
.click() for masthead interactions: update the class declaration to extend
BasePage, replace direct .click() calls (e.g. in async openQuickCreate() using
quickCreateToggle and any other masthead locators referenced) with
this.robustClick(locator), and ensure you rely on BasePage methods like
waitForLoadingComplete() and goTo() where appropriate to follow the project e2e
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 @.claude/skills/debug-e2e/SKILL.md:
- Around line 2-10: Update the markdown heading to match the renamed skill by
replacing the existing "# Debug Test" heading with a heading that matches the
skill name "debug-e2e" (for example "# debug-e2e" or a more descriptive "# Debug
E2E (debug-e2e)") so the top-level heading aligns with the name: debug-e2e
declared in the file; locate the heading in the SKILL.md content and edit it
accordingly.

In `@frontend/e2e/pages/list-page.ts`:
- Around line 8-15: Replace the brittle class/OUIA locators with test-id-based
Playwright selectors: update dataViewCells, dataViewFilters, nameFilterInput,
and singleFilterGroup to use page.getByTestId('...') querying [data-test="..."]
(choose meaningful test ids like "data-view-cell", "data-view-filters",
"name-filter-input", "single-filter-group"); if any target element lacks a
data-test attribute, add data-test in the UI component (keep existing
legacy/class/OUIA attributes), and update any other similar locators in the file
(e.g., the ones noted around the rest of the file) to follow the same
page.getByTestId convention.

---

Nitpick comments:
In `@frontend/e2e/pages/masthead-page.ts`:
- Around line 19-24: The page object should extend BasePage and use its
robustClick helper rather than direct .click() for masthead interactions: update
the class declaration to extend BasePage, replace direct .click() calls (e.g. in
async openQuickCreate() using quickCreateToggle and any other masthead locators
referenced) with this.robustClick(locator), and ensure you rely on BasePage
methods like waitForLoadingComplete() and goTo() where appropriate to follow the
project e2e guidelines.
🪄 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: e705fb20-6f31-4e42-939b-49c9a13120d5

📥 Commits

Reviewing files that changed from the base of the PR and between 06b20a5 and b2d42e0.

📒 Files selected for processing (15)
  • .claude/skills/debug-e2e/SKILL.md
  • frontend/e2e/clients/kubernetes-client.ts
  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/pages/catalog-page.ts
  • frontend/e2e/pages/details-page.ts
  • frontend/e2e/pages/list-page.ts
  • frontend/e2e/pages/logs-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/pages/overview-page.ts
  • frontend/e2e/tests/console/app/filtering-and-searching.spec.ts
  • frontend/e2e/tests/console/app/masthead.spec.ts
  • frontend/e2e/tests/console/app/node-terminal.spec.ts
  • frontend/e2e/tests/console/app/overview.spec.ts
  • frontend/e2e/tests/console/app/resource-log.spec.ts
  • frontend/e2e/tests/console/app/template.spec.ts
🚧 Files skipped from review as they are similar to previous changes (11)
  • frontend/e2e/tests/console/app/overview.spec.ts
  • frontend/e2e/pages/overview-page.ts
  • frontend/e2e/tests/console/app/node-terminal.spec.ts
  • frontend/e2e/clients/kubernetes-client.ts
  • frontend/e2e/pages/details-page.ts
  • frontend/e2e/tests/console/app/masthead.spec.ts
  • frontend/e2e/pages/logs-page.ts
  • frontend/e2e/tests/console/app/filtering-and-searching.spec.ts
  • frontend/e2e/tests/console/app/resource-log.spec.ts
  • frontend/e2e/pages/catalog-page.ts
  • frontend/e2e/tests/console/app/template.spec.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (11)
frontend/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

frontend/**/*.{ts,tsx,js,jsx}: Never import from package index files (e.g., @console/shared) in new code, as they can create circular dependencies and slow builds. Import from specific file paths instead.
Do not use backticks in t() calls for i18n strings, as the i18n parser cannot extract keys from template literals. Use single or double quotes instead.

Files:

  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/pages/list-page.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Never import from deprecated packages or use code with the @deprecated TSdoc tag in new code.

**/*.{ts,tsx}: Use React functional components with hooks instead of class components
State Management: Use React hooks and Context API (migrating away from legacy Redux/Immutable.js)
Hooks: Use existing hooks from console-shared when possible (useK8sWatchResource, useUserSettings, etc.)
API calls: Use k8s resource hooks for data fetching, consoleFetchJSON for HTTP requests
Extensions: Use console extension points for plugin integration
Types: Check existing types in console-shared before creating new ones
Dynamic Plugins: Use console extension points for plugin integration
Styling: Use SCSS modules co-located with components, PatternFly design system components, avoid any SCSS/CSS if possible
Accessibility: Follow WCAG 2.1 AA standards, use semantic HTML, ARIA labels where needed, ensure keyboard navigation, test with screen readers
i18n: Use useTranslation('namespace') hook with key format for translation keys
Error Handling: Use ErrorBoundary components and graceful degradation patterns
Optimize re-renders: Use useCallback for memoized callbacks to avoid function recreation every render
Optimize re-renders: Use useMemo for expensive computations to avoid recalculating on every render
Lazy loading: Use React.lazy() to lazy load heavy components
TypeScript type safety: Avoid using any type; suggest proper type definitions and verify null/undefined are handled properly
Type component props properly: Reuse existing component prop types instead of duplicating type definitions
Use proper hooks: Use specialized hooks like usePluginInfo for plugin data instead of generic data fetching patterns
Avoid deprecated components: Check for JSDoc @deprecated tags, import paths containing /deprecated, and DEPRECATED_ file name prefix before using components
Importing from barrel files and circular dependencies: Import directly from specific files instead...

Files:

  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/pages/list-page.ts
frontend/**/*.{ts,tsx,js,jsx,json}

📄 CodeRabbit inference engine (AGENTS.md)

Never use absolute URLs or paths in the console code. The console runs behind a proxy under an arbitrary path.

Files:

  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/pages/list-page.ts
frontend/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

When writing code for static plugins, ensure that all $codeRef reference the corresponding extension type from the @console/dynamic-plugin-sdk package.

Files:

  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/pages/list-page.ts
**/*.{tsx,ts}

📄 CodeRabbit inference engine (TESTING.md)

**/*.{tsx,ts}: Always use page.getByTestId('x') for Playwright selectors which queries [data-test="x"]. If a React element only has a legacy test attribute, add data-test to the element. Never remove legacy attributes
Prefer data-test attributes in Cypress selectors (e.g., cy.get('[data-test="create-deployment"]')) over brittle CSS/ARIA selectors

File Naming: PascalCase for components, kebab-case for utilities, *.spec.ts(x) for tests

Files:

  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/pages/list-page.ts
frontend/e2e/pages/**/*.ts

📄 CodeRabbit inference engine (TESTING.md)

Extend BasePage in Playwright page objects which provides robustClick(), waitForLoadingComplete(), and goTo(). Locators are private readonly properties; actions are async methods

Files:

  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/pages/list-page.ts
**/*.{go,ts,tsx,js,jsx}

📄 CodeRabbit inference engine (STYLEGUIDE.md)

Use lowercase dash-separated names for all files to avoid git issues with case-insensitive file systems

Files:

  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/pages/list-page.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (STYLEGUIDE.md)

**/*.{ts,tsx,js,jsx}: New code MUST be written in TypeScript, not JavaScript
Prefer functional programming patterns and immutable data structures
Run the linter and follow all rules defined in .eslintrc
Never use absolute paths in code - the app should be able to run behind a proxy under an arbitrary path

Files:

  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/pages/list-page.ts
**/*.ts

📄 CodeRabbit inference engine (STYLEGUIDE.md)

Plugin SDK Changes: Any updates to console-dynamic-plugin-sdk should aim to maintain backward compatibility as it's a public API - use the plugin-api-review skill to vet changes for public API impact and ensure proper documentation updates

Files:

  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/pages/list-page.ts
frontend/**/*.{js,ts,tsx}

📄 CodeRabbit inference engine (README.md)

frontend/**/*.{js,ts,tsx}: Support only the latest versions of Edge, Chrome, Safari, and Firefox browsers; IE 11 and earlier are not supported
CSP violations should be automatically reported to telemetry by parsing dynamic plugin names from securitypolicyviolation events, with throttling to prevent duplicate reports within a day

Files:

  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/pages/list-page.ts
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (INTERNATIONALIZATION.md)

For dynamic translation keys that cannot be parsed by i18next-parser (t(key), t('key' + id), t(key${id})), specify possible static values in comments for the parser to extract

Files:

  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/pages/list-page.ts
🪛 ast-grep (0.42.2)
frontend/e2e/pages/list-page.ts

[warning] 64-64: Regular expression constructed from variable input detected. This can lead to Regular Expression Denial of Service (ReDoS) attacks if the variable contains malicious patterns. Use libraries like 'recheck' to validate regex safety or use static patterns.
Context: new RegExp(pattern.source, safeFlags)
Note: [CWE-1333] Inefficient Regular Expression Complexity [REFERENCES]
- https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS
- https://cwe.mitre.org/data/definitions/1333.html

(regexp-from-variable)

🪛 LanguageTool
.claude/skills/debug-e2e/SKILL.md

[style] ~105-~105: The adverb ‘sometimes’ is usually put before the verb ‘passes’.
Context: ...structure setup first. ### Flaky test (passes sometimes, fails sometimes) If a test passes on ...

(ADVERB_WORD_ORDER)

🔇 Additional comments (3)
frontend/e2e/pages/base-page.ts (1)

36-39: LGTM!

frontend/e2e/pages/masthead-page.ts (1)

5-18: LGTM!

Also applies to: 41-47, 56-59

frontend/e2e/pages/list-page.ts (1)

63-76: LGTM!

Comment thread .claude/skills/debug-e2e/SKILL.md
Comment thread frontend/e2e/pages/list-page.ts
@stefanonardo

Copy link
Copy Markdown
Contributor Author

/retest

@stefanonardo stefanonardo force-pushed the CONSOLE-5235 branch 2 times, most recently from a4685f9 to 926c556 Compare May 19, 2026 14:23
@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 19, 2026
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 20, 2026
@stefanonardo stefanonardo force-pushed the CONSOLE-5235 branch 2 times, most recently from 6999b55 to f7a5e3c Compare May 21, 2026 08:37

@logonoff logonoff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/label px-approved
/label docs-approved

@openshift-ci openshift-ci Bot added px-approved Signifies that Product Support has signed off on this PR docs-approved Signifies that Docs has signed off on this PR labels May 21, 2026
Comment thread frontend/e2e/tests/console/app/masthead.spec.ts Outdated
@stefanonardo stefanonardo force-pushed the CONSOLE-5235 branch 2 times, most recently from 0b7e476 to 598324e Compare May 21, 2026 15:15
@fsgreco

fsgreco commented May 21, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 21, 2026
@openshift-ci

openshift-ci Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fsgreco, logonoff, stefanonardo
Once this PR has been reviewed and has the lgtm label, please assign therealjon 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

@fsgreco

fsgreco commented May 25, 2026

Copy link
Copy Markdown
Contributor

/verified by CI

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label May 25, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@fsgreco: This PR has been marked as verified by CI.

Details

In response to this:

/verified by CI

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.

@stefanonardo

Copy link
Copy Markdown
Contributor Author

/retest ci/prow-e2e-playwright

@stefanonardo

Copy link
Copy Markdown
Contributor Author

/test e2e-playwright

1 similar comment
@stefanonardo

Copy link
Copy Markdown
Contributor Author

/test e2e-playwright

@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Jun 8, 2026
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 8, 2026
@openshift-ci

openshift-ci Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

@openshift-ci-robot

openshift-ci-robot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

@stefanonardo: This pull request references CONSOLE-5235 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 story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Analysis / Root cause:
CONSOLE-5235 — Migrate 6 Cypress test files (21 tests) from packages/integration-tests/tests/app/ to Playwright as part of the OCP 5.0 Playwright migration effort (CONSOLE-5196).

Solution description:
Migrated all 6 basic app Cypress test files to idiomatic Playwright:

Cypress file Playwright spec Tests
masthead.cy.ts masthead.spec.ts 6
overview.cy.ts overview.spec.ts 2
node-terminal.cy.ts node-terminal.spec.ts 1
resource-log.cy.ts resource-log.spec.ts 3
template.cy.ts template.spec.ts 1
filtering-and-searching.cy.ts filtering-and-searching.spec.ts 8

New page objects (reusable across future migrations):

  • ListPage — DataView table, filtering by name, row assertions
  • DetailsPage — resource details loading, tab navigation, kebab actions (merged with upstream additions)
  • LogsPage — log viewer options, wrap toggle, container select, search
  • CatalogPage — catalog filtering, item/icon assertions
  • MastheadPage — logo, quick create, user dropdown
  • OverviewPage — cluster overview + topology list view, sidebar (merged with upstream additions)

KubernetesClient extensions: createPod, deletePod, waitForPodReady (with container readiness check), createDeployment, waitForDeploymentReady

Key translation decisions:

  • Replaced all cy.exec('oc ...') with KubernetesClient API calls
  • Replaced cy.login()/cy.initAdmin() with storageState auth
  • Replaced cy.wait(ms) with condition-based assertions
  • Each test is self-contained with proper cleanup via cleanup.trackNamespace()
  • All selectors verified against live cluster UI via Playwright MCP
  • Used Partial<V1Pod> / Partial<V1Deployment> types to avoid unsafe as any casts
  • Template test uses unique name (Date.now()) to prevent collisions

Fixes to existing cluster-settings tests:

Tests that use page.route() to mock Kubernetes API responses (e.g. ClusterVersion, MachineConfigPool) were failing because the console's watchK8sObject makes two requests per watched resource: an HTTP GET (intercepted by page.route()) and a WebSocket watch (not intercepted). The WebSocket delivered real cluster data that overwrote the mocked GET response in the Redux store.

Fix: Added page.routeWebSocket(pattern, () => {}) calls alongside the existing page.route() mocks. When the handler doesn't call connectToServer(), Playwright creates a mock WebSocket that appears open to the page but never delivers server messages. The URL patterns are specific (e.g. /apis\/config\.openshift\.io\/v1\/clusterversions/), so only matching WebSocket connections are intercepted — all other WebSockets pass through normally.

In update-modal.spec.ts, the previous 45-line stubMachineConfigPoolWebSocket() function used page.addInitScript() to monkey-patch the global WebSocket constructor. This was replaced with two idiomatic one-liners using page.routeWebSocket() (available since Playwright 1.48; project uses 1.59+), which provides the same selective interception behavior without modifying global browser state.

Affected files: channel-modal.spec.ts, update-in-progress.spec.ts, upgradeable-false.spec.ts, updates-graph.spec.ts, update-modal.spec.ts, worker-mcp-paused.spec.ts.

Additional page object fixes:

  • overview-page.ts: Fixed labelCell() — the .odc-topology-list-view__label-cell element contains both the kind badge prefix (e.g. "DaemonSetD") and the resource name, so the regex ^name$ never matched. Changed to substring match.
  • catalog-page.ts: Fixed catalogItemIcon() — PatternFly's CatalogTile renders <img alt="">, which per ARIA spec has role="presentation", so getByRole('img') correctly skips it. Changed to CSS selector img.catalog-tile-pf-icon.

Screenshots / screen recording:

Test setup:
Requires a running OpenShift cluster. Configure frontend/e2e/.env with cluster credentials, then run:

cd frontend
npx playwright test --project=console tests/console/app/

Test cases:

  • All 21 migrated tests pass against a live cluster with --retries=0
  • Tests verified stable across 3 consecutive runs
  • Original Cypress test files deleted after validation
  • Exclusive Cypress dependencies deleted (views/logs.ts, views/catalogs.ts, views/overview.ts, fixture YAMLs)
  • TypeScript type check passes (npx tsc --noEmit)
  • ESLint passes on all files including eslint-plugin-playwright rules

Browser conformance:

  • Chrome (Playwright Chromium)
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Tests

  • Expanded end-to-end test coverage for console features including filtering, searching, pod logs, node terminal, and cluster settings.

  • Migrated test framework from Cypress to Playwright for improved test reliability and maintainability.

  • Chores

  • Updated testing infrastructure utilities and documentation.

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.

@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 @.claude/skills/debug-e2e/SKILL.md:
- Around line 2-8: Update all documentation references from the old command
"/debug-test" to the new "/debug-e2e": search AGENTS.md for the "/debug-test"
mention and replace it with "/debug-e2e", and likewise open
.claude/skills/migrate-cypress/SKILL.md and replace every "/debug-test"
occurrence (around the noted sections) with "/debug-e2e" so the user-facing
guidance matches the new command name used in .claude/skills/debug-e2e/SKILL.md;
run a quick repo-wide grep to confirm no remaining references.

In `@frontend/e2e/clients/kubernetes-client.ts`:
- Around line 479-487: The tests calling the old two-argument createPod API need
to be updated to build and pass a complete k8s.V1Pod with metadata.namespace set
and call createPod(pod: V1Pod). In
frontend/e2e/tests/console/app/resource-log.spec.ts replace calls like
k8sClient.createPod(ns, examplePodSpec) or k8sClient.createPod(ns, wrapPodSpec)
by ensuring examplePodSpec/wrapPodSpec are wrapped or extended into a V1Pod
object that has metadata = { name: ..., namespace: ns } (or at minimum
metadata.namespace = ns) and then call k8sClient.createPod(pod). Keep using the
existing createPod method name and ensure any helper that previously returned
only a PodSpec now returns or is wrapped into a full V1Pod with
metadata.namespace populated.
- Around line 391-393: The patchSecret method is missing the explicit JSON Patch
contentType causing possible 415 errors; update patchSecret to call
this.k8sApi.patchNamespacedSecret with an options object that sets contentType
to 'application/json-patch+json' (same style as patchConfigMap) and pass the
patch as the body, ensuring the method signature and returned Promise remain
unchanged; locate function patchSecret and the call to patchNamespacedSecret to
apply this change.
🪄 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: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 134a532b-b1d5-450e-b6fd-a7256b0ff131

📥 Commits

Reviewing files that changed from the base of the PR and between 19e532c and 7dbdc2e.

📒 Files selected for processing (22)
  • .claude/migration-context.md
  • .claude/skills/debug-e2e/SKILL.md
  • frontend/e2e/clients/kubernetes-client.ts
  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/pages/catalog-page.ts
  • frontend/e2e/pages/details-page.ts
  • frontend/e2e/pages/list-page.ts
  • frontend/e2e/pages/logs-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/pages/overview-page.ts
  • frontend/e2e/tests/console/app/filtering-and-searching.spec.ts
  • frontend/e2e/tests/console/app/masthead.spec.ts
  • frontend/e2e/tests/console/app/node-terminal.spec.ts
  • frontend/e2e/tests/console/app/overview.spec.ts
  • frontend/e2e/tests/console/app/resource-log.spec.ts
  • frontend/e2e/tests/console/app/template.spec.ts
  • frontend/e2e/tests/console/cluster-settings/channel-modal.spec.ts
  • frontend/e2e/tests/console/cluster-settings/update-in-progress.spec.ts
  • frontend/e2e/tests/console/cluster-settings/update-modal.spec.ts
  • frontend/e2e/tests/console/cluster-settings/updates-graph.spec.ts
  • frontend/e2e/tests/console/cluster-settings/upgradeable-false.spec.ts
  • frontend/e2e/tests/console/cluster-settings/worker-mcp-paused.spec.ts
✅ Files skipped from review due to trivial changes (2)
  • frontend/e2e/tests/console/cluster-settings/update-in-progress.spec.ts
  • frontend/e2e/tests/console/app/template.spec.ts
🚧 Files skipped from review as they are similar to previous changes (14)
  • frontend/e2e/tests/console/cluster-settings/channel-modal.spec.ts
  • frontend/e2e/tests/console/cluster-settings/worker-mcp-paused.spec.ts
  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/tests/console/cluster-settings/upgradeable-false.spec.ts
  • frontend/e2e/tests/console/cluster-settings/updates-graph.spec.ts
  • frontend/e2e/pages/catalog-page.ts
  • frontend/e2e/tests/console/app/node-terminal.spec.ts
  • frontend/e2e/tests/console/app/masthead.spec.ts
  • frontend/e2e/pages/logs-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/tests/console/app/overview.spec.ts
  • frontend/e2e/pages/overview-page.ts
  • frontend/e2e/tests/console/app/resource-log.spec.ts
  • frontend/e2e/tests/console/app/filtering-and-searching.spec.ts

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

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

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 @.claude/skills/debug-e2e/SKILL.md:
- Around line 2-8: Update all documentation references from the old command
"/debug-test" to the new "/debug-e2e": search AGENTS.md for the "/debug-test"
mention and replace it with "/debug-e2e", and likewise open
.claude/skills/migrate-cypress/SKILL.md and replace every "/debug-test"
occurrence (around the noted sections) with "/debug-e2e" so the user-facing
guidance matches the new command name used in .claude/skills/debug-e2e/SKILL.md;
run a quick repo-wide grep to confirm no remaining references.

In `@frontend/e2e/clients/kubernetes-client.ts`:
- Around line 479-487: The tests calling the old two-argument createPod API need
to be updated to build and pass a complete k8s.V1Pod with metadata.namespace set
and call createPod(pod: V1Pod). In
frontend/e2e/tests/console/app/resource-log.spec.ts replace calls like
k8sClient.createPod(ns, examplePodSpec) or k8sClient.createPod(ns, wrapPodSpec)
by ensuring examplePodSpec/wrapPodSpec are wrapped or extended into a V1Pod
object that has metadata = { name: ..., namespace: ns } (or at minimum
metadata.namespace = ns) and then call k8sClient.createPod(pod). Keep using the
existing createPod method name and ensure any helper that previously returned
only a PodSpec now returns or is wrapped into a full V1Pod with
metadata.namespace populated.
- Around line 391-393: The patchSecret method is missing the explicit JSON Patch
contentType causing possible 415 errors; update patchSecret to call
this.k8sApi.patchNamespacedSecret with an options object that sets contentType
to 'application/json-patch+json' (same style as patchConfigMap) and pass the
patch as the body, ensuring the method signature and returned Promise remain
unchanged; locate function patchSecret and the call to patchNamespacedSecret to
apply this change.
🪄 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: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 134a532b-b1d5-450e-b6fd-a7256b0ff131

📥 Commits

Reviewing files that changed from the base of the PR and between 19e532c and 7dbdc2e.

📒 Files selected for processing (22)
  • .claude/migration-context.md
  • .claude/skills/debug-e2e/SKILL.md
  • frontend/e2e/clients/kubernetes-client.ts
  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/pages/catalog-page.ts
  • frontend/e2e/pages/details-page.ts
  • frontend/e2e/pages/list-page.ts
  • frontend/e2e/pages/logs-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/pages/overview-page.ts
  • frontend/e2e/tests/console/app/filtering-and-searching.spec.ts
  • frontend/e2e/tests/console/app/masthead.spec.ts
  • frontend/e2e/tests/console/app/node-terminal.spec.ts
  • frontend/e2e/tests/console/app/overview.spec.ts
  • frontend/e2e/tests/console/app/resource-log.spec.ts
  • frontend/e2e/tests/console/app/template.spec.ts
  • frontend/e2e/tests/console/cluster-settings/channel-modal.spec.ts
  • frontend/e2e/tests/console/cluster-settings/update-in-progress.spec.ts
  • frontend/e2e/tests/console/cluster-settings/update-modal.spec.ts
  • frontend/e2e/tests/console/cluster-settings/updates-graph.spec.ts
  • frontend/e2e/tests/console/cluster-settings/upgradeable-false.spec.ts
  • frontend/e2e/tests/console/cluster-settings/worker-mcp-paused.spec.ts
✅ Files skipped from review due to trivial changes (2)
  • frontend/e2e/tests/console/cluster-settings/update-in-progress.spec.ts
  • frontend/e2e/tests/console/app/template.spec.ts
🚧 Files skipped from review as they are similar to previous changes (14)
  • frontend/e2e/tests/console/cluster-settings/channel-modal.spec.ts
  • frontend/e2e/tests/console/cluster-settings/worker-mcp-paused.spec.ts
  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/tests/console/cluster-settings/upgradeable-false.spec.ts
  • frontend/e2e/tests/console/cluster-settings/updates-graph.spec.ts
  • frontend/e2e/pages/catalog-page.ts
  • frontend/e2e/tests/console/app/node-terminal.spec.ts
  • frontend/e2e/tests/console/app/masthead.spec.ts
  • frontend/e2e/pages/logs-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/tests/console/app/overview.spec.ts
  • frontend/e2e/pages/overview-page.ts
  • frontend/e2e/tests/console/app/resource-log.spec.ts
  • frontend/e2e/tests/console/app/filtering-and-searching.spec.ts
🛑 Comments failed to post (3)
.claude/skills/debug-e2e/SKILL.md (1)

2-8: ⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Find all references to /debug-test or debug-test in documentation

echo "=== Searching for /debug-test command references ==="
rg -n --type=md '/debug-test' -g '!.claude/skills/debug-e2e/*'

echo ""
echo "=== Searching for debug-test skill references (excluding this file) ==="
rg -n --type=md 'debug-test' -g '!.claude/skills/debug-e2e/*' -g '.claude/**' -g 'AGENTS.md'

Repository: openshift/console

Length of output: 711


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Locate migrate-cypress SKILL.md ==="
fd -a "migrate-cypress" .claude/skills --type f || true
fd -a "migrate-cypress/SKILL.md" .claude/skills --type f || true

echo
echo "=== Search for /debug-test and debug-test in .claude/skills (excluding debug-e2e skill) ==="
rg -n --type=md '(/)?debug-test' -g '!.claude/skills/debug-e2e/*' .claude/skills || true

echo
echo "=== Search for /debug-e2e and debug-e2e in .claude/skills ==="
rg -n --type=md '(/)?debug-e2e' .claude/skills || true

echo
echo "=== Search for /debug-test and debug-test in the repo (md only, excluding debug-e2e skill file) ==="
rg -n --type=md '(/)?debug-test' -g '!.claude/skills/debug-e2e/*' . || true

Repository: openshift/console

Length of output: 2636


Update docs to use /debug-e2e instead of /debug-test.

References to the old command still exist in:

  • AGENTS.md:136 (/debug-test)
  • .claude/skills/migrate-cypress/SKILL.md:6, 75, 155 (multiple /debug-test mentions)

This will break the user-facing guidance after the rename.

🤖 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 @.claude/skills/debug-e2e/SKILL.md around lines 2 - 8, Update all
documentation references from the old command "/debug-test" to the new
"/debug-e2e": search AGENTS.md for the "/debug-test" mention and replace it with
"/debug-e2e", and likewise open .claude/skills/migrate-cypress/SKILL.md and
replace every "/debug-test" occurrence (around the noted sections) with
"/debug-e2e" so the user-facing guidance matches the new command name used in
.claude/skills/debug-e2e/SKILL.md; run a quick repo-wide grep to confirm no
remaining references.
frontend/e2e/clients/kubernetes-client.ts (2)

391-393: ⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate the file in question
ls -la frontend/e2e/clients/kubernetes-client.ts

# Show the patchSecret implementation and nearby context
sed -n '340,430p' frontend/e2e/clients/kubernetes-client.ts

# Find all call sites of patchSecret
rg -n "patchSecret\(" -S frontend | head -n 50

# Find all uses of patchNamespacedSecret in the repo
rg -n "patchNamespacedSecret" -S frontend | head -n 50

# Show any imports of k8s/PatchStrategy in this file
rg -n "from .*k8s|PatchStrategy|PatchType|contentType|JsonPatch" frontend/e2e/clients/kubernetes-client.ts

Repository: openshift/console

Length of output: 3285


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect imports / k8sApi setup in the kubernetes-client
sed -n '1,140p' frontend/e2e/clients/kubernetes-client.ts
rg -n "new (Kubernetes|CoreV1Api)|CoreV1Api|k8s\\.PatchStrategy|PatchStrategy" frontend/e2e/clients/kubernetes-client.ts

# Inspect patchSecret call sites to see what patch payload is actually passed
sed -n '1,140p' frontend/e2e/tests/console/cluster-settings/alertmanager/receivers/email.spec.ts
sed -n '1,120p' frontend/e2e/tests/console/cluster-settings/alertmanager/alertmanager-test-utils.ts

# Find any other patchSecret uses
rg -n "patchSecret\(" frontend/e2e/tests frontend/e2e/clients -S

# Try to locate the TypeScript signature for patchNamespacedSecret (may exist in installed deps)
# If node_modules is present, this helps settle whether contentType is required/expected.
if [ -d frontend/node_modules ]; then
  rg -n "patchNamespacedSecret\\(" frontend/node_modules -S --glob='*.d.ts' --glob='*.ts' | head -n 50 || true
fi

Repository: openshift/console

Length of output: 11080


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show more context around patchSecret and any other patch helpers
sed -n '220,420p' frontend/e2e/clients/kubernetes-client.ts

# Check if node_modules exists and contains type defs for `@kubernetes/client-node`
if [ -d frontend/node_modules ]; then
  echo "node_modules exists"
  ls -la frontend/node_modules/@kubernetes 2>/dev/null || true
  # Find installed client-node version
  cat frontend/node_modules/@kubernetes/client-node/package.json 2>/dev/null | rg -n '"version"' || true
  # Search type declarations for patchNamespacedSecret
  rg -n "patchNamespacedSecret" frontend/node_modules/@kubernetes/client-node -S --glob='*.d.ts' --glob='*.ts' | head -n 50 || true
else
  echo "node_modules missing"
fi

# Determine client-node version from lockfile/package.json
rg -n "`@kubernetes/client-node`" frontend/package.json frontend/yarn.lock frontend/**/package.json | head -n 50

Repository: openshift/console

Length of output: 6034


🌐 Web query:

@kubernetes/client-node@1.4.0 patchNamespacedSecret contentType default PatchStrategy JsonPatch

💡 Result:

In the @kubernetes/client-node library (version 1.4.0), there is no single default Content-Type for patch operations that automatically satisfies all Kubernetes API requirements [1][2][3]. When using the patchNamespacedSecret method (or other patch methods), you must explicitly set the Content-Type header to match the format of the patch body you are providing, or you may encounter an HTTP 415 (Unsupported Media Type) error [1][4][5][6]. To avoid errors, you should pass the appropriate header in the options parameter of the method call [2][7][6]. The library provides constants for these patch strategies, which should be used to ensure the correct string is passed [2][7]: import { PatchUtils } from '@kubernetes/client-node'; // Example: Using JSON Patch const options = { headers: { 'Content-Type': PatchUtils.PATCH_FORMAT_JSON_PATCH } }; await k8sApi.patchNamespacedSecret( name, namespace, patchBody, undefined, undefined, undefined, undefined, undefined, options); The supported patch formats typically include [2][7]: 1. JSON Patch (RFC 6902): PatchUtils.PATCH_FORMAT_JSON_PATCH ('application/json-patch+json') 2. JSON Merge Patch (RFC 7396): PatchUtils.PATCH_FORMAT_JSON_MERGE_PATCH ('application/merge-patch+json') 3. Strategic Merge Patch: PatchUtils.PATCH_FORMAT_STRATEGIC_MERGE_PATCH ('application/strategic-merge-patch+json') 4. Server-Side Apply: PatchUtils.PATCH_FORMAT_APPLY_YAML ('application/apply-patch+yaml') If you do not specify the header, the request may default to an incorrect or generic type, which frequently causes the server to reject the request [1][4][6]. Because the library's signature for patch methods involves multiple optional parameters, ensure your options object is passed at the correct position (the final argument) [1][2][6].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n "patchNamespaced.*\(" frontend -S | head -n 200
rg -n "patchNamespaced.*contentType|k8s\\.PatchStrategy\\.(JsonPatch|MergePatch|Strategic)" frontend -S
rg -n "PatchStrategy\\.JsonPatch|PatchStrategy\\.MergePatch|contentType:" frontend/e2e/clients/kubernetes-client.ts frontend -S

Repository: openshift/console

Length of output: 2166


🏁 Script executed:

#!/bin/bash
set -euo pipefail
rg -n "PatchStrategy\\.JsonPatch|PATCH_FORMAT_JSON_PATCH|PatchUtils\\.PATCH_FORMAT_JSON_PATCH" frontend -S || true
rg -n "PatchStrategy\\." frontend/e2e/clients/kubernetes-client.ts

Repository: openshift/console

Length of output: 114


🌐 Web query:

@kubernetes/client-node 1.4.0 PatchStrategy JsonPatch value PatchStrategy

💡 Result:

In @kubernetes/client-node version 1.4.0, PatchStrategy is a constant object used to define the appropriate Content-Type header value for Kubernetes patch operations [1]. The PatchStrategy object includes the following mapping for patch types [1]: * JsonPatch: 'application/json-patch+json' (RFC 6902) * MergePatch: 'application/merge-patch+json' (RFC 7396) * StrategicMergePatch: 'application/strategic-merge-patch+json' (Kubernetes-specific) * ServerSideApply: 'application/apply-patch+yaml' When performing patch requests (e.g., using methods like patchNamespacedDeployment), the Content-Type header must be correctly set to one of these values to match the payload format, as omitting or misconfiguring it often results in a 415 Unsupported Media Type error [1][2][3]. In practice, this is typically passed via the options parameter in the API call [1][4]. For example: await k8sApi.patchNamespacedDeployment( 'my-deployment', 'default', patch, undefined, undefined, undefined, undefined, undefined, { headers: { 'Content-Type': PatchStrategy.JsonPatch } }); The library also exports the PatchStrategy type, defined as typeof PatchStrategy[keyof typeof PatchStrategy], allowing for strict typing of patch operations within the client [1].

Citations:


Set explicit JSON Patch strategy for patchSecret.

patchSecret is called with RFC6902-style JSON Patch operations ({ op, path, value }), but the patchNamespacedSecret request omits contentType, which can cause 415 Unsupported Media Type failures at runtime (note patchConfigMap already sets contentType).

Proposed fix
  async patchSecret(name: string, namespace: string, patch: object[]): Promise<void> {
-    await this.k8sApi.patchNamespacedSecret({ name, namespace, body: patch });
+    await this.k8sApi.patchNamespacedSecret({
+      name,
+      namespace,
+      body: patch,
+      contentType: k8s.PatchStrategy.JsonPatch,
+    } as any);
  }
🤖 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 `@frontend/e2e/clients/kubernetes-client.ts` around lines 391 - 393, The
patchSecret method is missing the explicit JSON Patch contentType causing
possible 415 errors; update patchSecret to call
this.k8sApi.patchNamespacedSecret with an options object that sets contentType
to 'application/json-patch+json' (same style as patchConfigMap) and pass the
patch as the body, ensuring the method signature and returned Promise remain
unchanged; locate function patchSecret and the call to patchNamespacedSecret to
apply this change.

479-487: ⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify createPod signature and all callsites.
rg -n -C2 --type=ts 'async createPod\s*\(' frontend/e2e/clients/kubernetes-client.ts
rg -n -C3 --type=ts '\bcreatePod\s*\(' frontend/e2e

Repository: openshift/console

Length of output: 2756


Fix remaining createPod callsites to use the new single-argument V1Pod contract

frontend/e2e/clients/kubernetes-client.ts now expects createPod(pod: k8s.V1Pod) and throws unless pod.metadata?.namespace is present. frontend/e2e/tests/console/app/resource-log.spec.ts still calls the old two-argument form (k8sClient.createPod(ns, examplePodSpec) / k8sClient.createPod(ns, wrapPodSpec)), so those tests will hit the error path at runtime. Update those callsites to pass a full V1Pod object (with metadata.namespace).

🤖 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 `@frontend/e2e/clients/kubernetes-client.ts` around lines 479 - 487, The tests
calling the old two-argument createPod API need to be updated to build and pass
a complete k8s.V1Pod with metadata.namespace set and call createPod(pod: V1Pod).
In frontend/e2e/tests/console/app/resource-log.spec.ts replace calls like
k8sClient.createPod(ns, examplePodSpec) or k8sClient.createPod(ns, wrapPodSpec)
by ensuring examplePodSpec/wrapPodSpec are wrapped or extended into a V1Pod
object that has metadata = { name: ..., namespace: ns } (or at minimum
metadata.namespace = ns) and then call k8sClient.createPod(pod). Keep using the
existing createPod method name and ensure any helper that previously returned
only a PodSpec now returns or is wrapped into a full V1Pod with
metadata.namespace populated.

Migrate 6 Cypress test files (21 tests) from
packages/integration-tests/tests/app/ to Playwright:
- masthead (6 tests)
- overview (2 tests)
- node-terminal (1 test)
- resource-log (3 tests)
- template (1 test)
- filtering-and-searching (8 tests)

New page objects: list-page, details-page, logs-page,
catalog-page, masthead-page, overview-page.

Extended KubernetesClient with createPod, deletePod,
waitForPodReady, createDeployment, waitForDeploymentReady.

Deleted Cypress files and their exclusive dependencies
(views/logs.ts, views/catalogs.ts, views/overview.ts,
fixture YAMLs) after validation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@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 @.claude/skills/debug-e2e/SKILL.md:
- Around line 19-31: Replace stale `/debug-test` references with `/debug-e2e` in
documentation: open AGENTS.md and .claude/migration-context.md and change any
occurrences of the literal command string "/debug-test" to "/debug-e2e"
(matching the examples in .claude/skills/debug-e2e/SKILL.md), and update any
example usages or command flags so they mirror the current `/debug-e2e`
invocation format (including project/workers examples) to keep docs consistent.

In `@frontend/e2e/pages/list-page.ts`:
- Line 53: The locator currently uses hasText: 'Name' which does substring
matching and may match "Namespace"; change the selector passed to robustClick to
use exact text matching — e.g., replace
this.page.locator('.pf-v6-c-menu__list-item', { hasText: 'Name' }) with an
exact-text locator such as this.page.getByText('Name', { exact: true }) or
this.page.locator('.pf-v6-c-menu__list-item', { hasText: /^Name$/ }) so
robustClick targets only the "Name" menu item.
🪄 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: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c946e48f-e5f6-4a73-9447-957a3533d06e

📥 Commits

Reviewing files that changed from the base of the PR and between 7dbdc2e and a0f2d7e.

📒 Files selected for processing (37)
  • .claude/migration-context.md
  • .claude/skills/debug-e2e/SKILL.md
  • frontend/e2e/clients/kubernetes-client.ts
  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/pages/catalog-page.ts
  • frontend/e2e/pages/details-page.ts
  • frontend/e2e/pages/list-page.ts
  • frontend/e2e/pages/logs-page.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/pages/overview-page.ts
  • frontend/e2e/tests/console/app/filtering-and-searching.spec.ts
  • frontend/e2e/tests/console/app/masthead.spec.ts
  • frontend/e2e/tests/console/app/node-terminal.spec.ts
  • frontend/e2e/tests/console/app/overview.spec.ts
  • frontend/e2e/tests/console/app/resource-log.spec.ts
  • frontend/e2e/tests/console/app/template.spec.ts
  • frontend/e2e/tests/console/cluster-settings/channel-modal.spec.ts
  • frontend/e2e/tests/console/cluster-settings/update-in-progress.spec.ts
  • frontend/e2e/tests/console/cluster-settings/update-modal.spec.ts
  • frontend/e2e/tests/console/cluster-settings/updates-graph.spec.ts
  • frontend/e2e/tests/console/cluster-settings/upgradeable-false.spec.ts
  • frontend/e2e/tests/console/cluster-settings/worker-mcp-paused.spec.ts
  • frontend/packages/integration-tests/fixtures/httpd-example-template.yaml
  • frontend/packages/integration-tests/fixtures/pod-with-space.yaml
  • frontend/packages/integration-tests/fixtures/pod-with-wrap-annotation.yaml
  • frontend/packages/integration-tests/tests/app/filtering-and-searching.cy.ts
  • frontend/packages/integration-tests/tests/app/masthead.cy.ts
  • frontend/packages/integration-tests/tests/app/node-terminal.cy.ts
  • frontend/packages/integration-tests/tests/app/overview.cy.ts
  • frontend/packages/integration-tests/tests/app/resource-log.cy.ts
  • frontend/packages/integration-tests/tests/app/template.cy.ts
  • frontend/packages/integration-tests/views/catalogs.ts
  • frontend/packages/integration-tests/views/logs.ts
  • frontend/packages/integration-tests/views/overview.ts
  • frontend/playwright.config.ts
  • frontend/public/components/utils/container-select.tsx
  • frontend/public/components/utils/resource-log.tsx
💤 Files with no reviewable changes (13)
  • frontend/packages/integration-tests/fixtures/pod-with-space.yaml
  • frontend/packages/integration-tests/tests/app/node-terminal.cy.ts
  • frontend/packages/integration-tests/tests/app/template.cy.ts
  • frontend/packages/integration-tests/tests/app/resource-log.cy.ts
  • frontend/packages/integration-tests/tests/app/overview.cy.ts
  • frontend/packages/integration-tests/fixtures/pod-with-wrap-annotation.yaml
  • frontend/packages/integration-tests/fixtures/httpd-example-template.yaml
  • frontend/packages/integration-tests/views/catalogs.ts
  • frontend/packages/integration-tests/tests/app/masthead.cy.ts
  • frontend/packages/integration-tests/tests/app/filtering-and-searching.cy.ts
  • frontend/packages/integration-tests/views/overview.ts
  • frontend/packages/integration-tests/views/logs.ts
  • frontend/playwright.config.ts
✅ Files skipped from review due to trivial changes (1)
  • frontend/public/components/utils/resource-log.tsx
🚧 Files skipped from review as they are similar to previous changes (20)
  • frontend/e2e/tests/console/cluster-settings/channel-modal.spec.ts
  • frontend/e2e/tests/console/cluster-settings/updates-graph.spec.ts
  • frontend/e2e/tests/console/app/node-terminal.spec.ts
  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/pages/catalog-page.ts
  • frontend/e2e/tests/console/cluster-settings/update-modal.spec.ts
  • frontend/e2e/tests/console/cluster-settings/worker-mcp-paused.spec.ts
  • frontend/e2e/tests/console/cluster-settings/update-in-progress.spec.ts
  • frontend/e2e/pages/masthead-page.ts
  • frontend/e2e/pages/logs-page.ts
  • frontend/e2e/clients/kubernetes-client.ts
  • frontend/e2e/tests/console/app/resource-log.spec.ts
  • frontend/e2e/tests/console/app/masthead.spec.ts
  • frontend/e2e/tests/console/app/template.spec.ts
  • frontend/e2e/tests/console/cluster-settings/upgradeable-false.spec.ts
  • frontend/e2e/pages/overview-page.ts
  • .claude/migration-context.md
  • frontend/e2e/pages/details-page.ts
  • frontend/e2e/tests/console/app/overview.spec.ts
  • frontend/e2e/tests/console/app/filtering-and-searching.spec.ts

Comment on lines +19 to 31
- **Spec file**: `/debug-e2e e2e/tests/console/cluster-settings/upstream-modal.spec.ts`
- **Test name**: `/debug-e2e "Verify console login"`
- **Directory**: `/debug-e2e e2e/tests/helm/`
- **Project**: `/debug-e2e --project=helm`
- **Optional workers**: append `--workers=N` (default: 4)

Examples:

```text
/debug-test e2e/tests/console/cluster-settings/upstream-modal.spec.ts
/debug-test e2e/tests/helm/ --workers=2
/debug-test --project=topology
/debug-e2e e2e/tests/console/cluster-settings/upstream-modal.spec.ts
/debug-e2e e2e/tests/helm/ --workers=2
/debug-e2e --project=topology
```

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.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Read-only check for stale command references after skill rename
rg -n --fixed-strings '/debug-test' AGENTS.md .claude/migration-context.md .claude/skills/debug-e2e/SKILL.md
rg -n --fixed-strings '/debug-e2e' AGENTS.md .claude/migration-context.md .claude/skills/debug-e2e/SKILL.md

Repository: openshift/console

Length of output: 1732


Update stale /debug-test references to /debug-e2e in workflow/context docs.

/debug-test is still referenced in AGENTS.md:136 and .claude/migration-context.md:3, while .claude/skills/debug-e2e/SKILL.md documents /debug-e2e. Update those docs so users don’t run the old command.

🤖 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 @.claude/skills/debug-e2e/SKILL.md around lines 19 - 31, Replace stale
`/debug-test` references with `/debug-e2e` in documentation: open AGENTS.md and
.claude/migration-context.md and change any occurrences of the literal command
string "/debug-test" to "/debug-e2e" (matching the examples in
.claude/skills/debug-e2e/SKILL.md), and update any example usages or command
flags so they mirror the current `/debug-e2e` invocation format (including
project/workers examples) to keep docs consistent.

async filterByName(name: string): Promise<void> {
const filterToggle = this.dataViewFilters.locator('.pf-v6-c-menu-toggle').first();
await this.robustClick(filterToggle);
await this.robustClick(this.page.locator('.pf-v6-c-menu__list-item', { hasText: 'Name' }));

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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use exact text matching for the filter option.

Line 53 uses hasText: 'Name', which is a substring match and can click the wrong option when another item also contains “Name” (for example, “Namespace”). Use an exact matcher.

Suggested fix
-    await this.robustClick(this.page.locator('.pf-v6-c-menu__list-item', { hasText: 'Name' }));
+    await this.robustClick(
+      this.page.locator('.pf-v6-c-menu__list-item', { hasText: /^Name$/ }),
+    );
🤖 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 `@frontend/e2e/pages/list-page.ts` at line 53, The locator currently uses
hasText: 'Name' which does substring matching and may match "Namespace"; change
the selector passed to robustClick to use exact text matching — e.g., replace
this.page.locator('.pf-v6-c-menu__list-item', { hasText: 'Name' }) with an
exact-text locator such as this.page.getByText('Name', { exact: true }) or
this.page.locator('.pf-v6-c-menu__list-item', { hasText: /^Name$/ }) so
robustClick targets only the "Name" menu item.

@openshift-ci

openshift-ci Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

@stefanonardo: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

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

Labels

component/core Related to console core functionality docs-approved Signifies that Docs has signed off on this PR jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. kind/cypress Related to Cypress e2e integration testing px-approved Signifies that Product Support has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants