Skip to content

CONSOLE-5283: Migrate dashboard Cypress tests to Playwright#16669

Open
rhamilto wants to merge 1 commit into
openshift:mainfrom
rhamilto:CONSOLE-5283
Open

CONSOLE-5283: Migrate dashboard Cypress tests to Playwright#16669
rhamilto wants to merge 1 commit into
openshift:mainfrom
rhamilto:CONSOLE-5283

Conversation

@rhamilto

@rhamilto rhamilto commented Jun 23, 2026

Copy link
Copy Markdown
Member

Analysis / Root cause:
CONSOLE-5283 — Migrate console e2e dashboard tests from Cypress to Playwright.

Solution description:
Migrate cluster-dashboard.cy.ts (8 tests) and project-dashboard.cy.ts (8 tests) to Playwright.

  • Add data-test attributes alongside existing data-test-id on dashboard card components (details, status, inventory, utilization, launcher, resource-quotas, duration-select) for both cluster and project dashboards
  • Create ProjectDashboardPage page object and extend ClusterDashboardPage with locators for all dashboard card elements
  • Add createResourceQuota/deleteResourceQuota to KubernetesClient and ResourceQuota cleanup handling to the cleanup fixture
  • Delete original Cypress test files (including previously migrated insights-popup.cy.ts)

Screenshots / screen recording:

Test setup:
Requires a running OpenShift cluster with e2e/.env configured.

Test cases:

  • Run npx playwright test --project=console frontend/e2e/tests/console/dashboards/ — all 16 tests should pass
  • Cluster Dashboard: Details Card fields, View settings link, Status Card alerts link, health indicators, Inventory Card items, Utilization Card items, duration dropdown
  • Project Dashboard: Details Card fields, View all link, Status Card Active status, Inventory Card items, Utilization Card items, duration dropdown, Launcher Card with ConsoleLink CR, Resource Quotas Card

Browser conformance:

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

Additional info:
N/A

Summary by CodeRabbit

  • Tests
    • Added end-to-end test coverage for the cluster dashboard validating details, status, inventory, utilization, and navigation links
    • Added end-to-end test coverage for the project dashboard, including launcher and resource quota display checks
    • Removed legacy Cypress integration suites for cluster/project dashboard and insights popup
  • Chores
    • Added/extended dashboard page objects and locators to improve test reliability
    • Updated dashboard UI elements with additional data-test attributes (including utilization duration and item containers)

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

openshift-ci-robot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

@rhamilto: This pull request references CONSOLE-5283 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-5283 — Migrate console e2e dashboard tests from Cypress to Playwright.

Solution description:
Migrate cluster-dashboard.cy.ts (8 tests) and project-dashboard.cy.ts (8 tests) to Playwright.

  • Add data-test attributes alongside existing data-test-id on dashboard card components (details, status, inventory, utilization, launcher, resource-quotas, duration-select) for both cluster and project dashboards
  • Create ProjectDashboardPage page object and extend ClusterDashboardPage with locators for all dashboard card elements
  • Add createResourceQuota/deleteResourceQuota to KubernetesClient and ResourceQuota cleanup handling to the cleanup fixture
  • Delete original Cypress test files (including previously migrated insights-popup.cy.ts)

Screenshots / screen recording:

Test setup:
Requires a running OpenShift cluster with e2e/.env configured.

Test cases:

  • Run npx playwright test --project=console frontend/e2e/tests/console/dashboards/ — all 16 tests should pass
  • Cluster Dashboard: Details Card fields, View settings link, Status Card alerts link, health indicators, Inventory Card items, Utilization Card items, duration dropdown
  • Project Dashboard: Details Card fields, View all link, Status Card Active status, Inventory Card items, Utilization Card items, duration dropdown, Launcher Card with ConsoleLink CR, Resource Quotas Card

Browser conformance:

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

Additional info:
N/A

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 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor
ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 488bb54b-d1ae-4bef-b4ca-aa2bab65b2d8

📥 Commits

Reviewing files that changed from the base of the PR and between 437fc5a and f4d398f.

📒 Files selected for processing (19)
  • frontend/e2e/clients/kubernetes-client.ts
  • frontend/e2e/fixtures/cleanup-fixture.ts
  • frontend/e2e/pages/cluster-dashboard-page.ts
  • frontend/e2e/pages/project-dashboard-page.ts
  • frontend/e2e/tests/console/dashboards/cluster-dashboard.spec.ts
  • frontend/e2e/tests/console/dashboards/project-dashboard.spec.ts
  • frontend/packages/console-shared/src/components/dashboard/utilization-card/UtilizationDurationDropdown.tsx
  • frontend/packages/console-shared/src/components/dashboard/utilization-card/UtilizationItem.tsx
  • frontend/packages/integration-tests/tests/dashboards/cluster-dashboard.cy.ts
  • frontend/packages/integration-tests/tests/dashboards/insights-popup.cy.ts
  • frontend/packages/integration-tests/tests/dashboards/project-dashboard.cy.ts
  • frontend/public/components/dashboard/dashboards-page/cluster-dashboard/details-card.tsx
  • frontend/public/components/dashboard/dashboards-page/cluster-dashboard/inventory-card.tsx
  • frontend/public/components/dashboard/dashboards-page/cluster-dashboard/status-card.tsx
  • frontend/public/components/dashboard/project-dashboard/details-card.tsx
  • frontend/public/components/dashboard/project-dashboard/inventory-card.tsx
  • frontend/public/components/dashboard/project-dashboard/launcher-card.tsx
  • frontend/public/components/dashboard/project-dashboard/resource-quota-card.tsx
  • frontend/public/components/dashboard/project-dashboard/status-card.tsx
💤 Files with no reviewable changes (3)
  • frontend/packages/integration-tests/tests/dashboards/cluster-dashboard.cy.ts
  • frontend/packages/integration-tests/tests/dashboards/insights-popup.cy.ts
  • frontend/packages/integration-tests/tests/dashboards/project-dashboard.cy.ts
✅ Files skipped from review due to trivial changes (9)
  • frontend/public/components/dashboard/project-dashboard/resource-quota-card.tsx
  • frontend/public/components/dashboard/dashboards-page/cluster-dashboard/details-card.tsx
  • frontend/public/components/dashboard/project-dashboard/status-card.tsx
  • frontend/public/components/dashboard/project-dashboard/launcher-card.tsx
  • frontend/packages/console-shared/src/components/dashboard/utilization-card/UtilizationDurationDropdown.tsx
  • frontend/public/components/dashboard/dashboards-page/cluster-dashboard/inventory-card.tsx
  • frontend/packages/console-shared/src/components/dashboard/utilization-card/UtilizationItem.tsx
  • frontend/public/components/dashboard/project-dashboard/inventory-card.tsx
  • frontend/public/components/dashboard/project-dashboard/details-card.tsx
🚧 Files skipped from review as they are similar to previous changes (5)
  • frontend/e2e/fixtures/cleanup-fixture.ts
  • frontend/public/components/dashboard/dashboards-page/cluster-dashboard/status-card.tsx
  • frontend/e2e/pages/project-dashboard-page.ts
  • frontend/e2e/pages/cluster-dashboard-page.ts
  • frontend/e2e/tests/console/dashboards/cluster-dashboard.spec.ts

Walkthrough

Migrates dashboard e2e coverage from Cypress to Playwright, adds Playwright page objects and specs for cluster and project dashboards, adds data-test hooks to dashboard components, and adds ResourceQuota creation and cleanup support for the project dashboard tests.

Changes

Dashboard e2e migration and selector support

Layer / File(s) Summary
Dashboard selectors
frontend/public/components/dashboard/dashboards-page/cluster-dashboard/details-card.tsx, frontend/public/components/dashboard/dashboards-page/cluster-dashboard/inventory-card.tsx, frontend/public/components/dashboard/dashboards-page/cluster-dashboard/status-card.tsx, frontend/public/components/dashboard/project-dashboard/details-card.tsx, frontend/public/components/dashboard/project-dashboard/inventory-card.tsx, frontend/public/components/dashboard/project-dashboard/launcher-card.tsx, frontend/public/components/dashboard/project-dashboard/resource-quota-card.tsx, frontend/public/components/dashboard/project-dashboard/status-card.tsx, frontend/packages/console-shared/src/components/dashboard/utilization-card/UtilizationDurationDropdown.tsx, frontend/packages/console-shared/src/components/dashboard/utilization-card/UtilizationItem.tsx
Dashboard cards and utilization controls add data-test attributes alongside existing data-test-id hooks.
Playwright page objects
frontend/e2e/pages/cluster-dashboard-page.ts, frontend/e2e/pages/project-dashboard-page.ts
ClusterDashboardPage and ProjectDashboardPage add Playwright locators and getter methods for dashboard cards, items, links, and selectors, plus project dashboard navigation.
ResourceQuota client and cleanup
frontend/e2e/clients/kubernetes-client.ts, frontend/e2e/fixtures/cleanup-fixture.ts
KubernetesClient adds ResourceQuota create/delete methods, and cleanup handling explicitly deletes tracked ResourceQuota resources.
Cluster dashboard Playwright spec
frontend/e2e/tests/console/dashboards/cluster-dashboard.spec.ts, frontend/packages/integration-tests/tests/dashboards/cluster-dashboard.cy.ts
The cluster dashboard Playwright spec covers details, status, inventory, and utilization cards; the Cypress suite is removed.
Project dashboard Playwright spec
frontend/e2e/tests/console/dashboards/project-dashboard.spec.ts, frontend/packages/integration-tests/tests/dashboards/project-dashboard.cy.ts, frontend/packages/integration-tests/tests/dashboards/insights-popup.cy.ts
The project dashboard Playwright spec covers details, status, inventory, utilization, launcher, and Resource Quotas; the Cypress project dashboard and insights popup suites are removed.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested labels

verified

Suggested reviewers

  • TheRealJon
  • jhadvig
🚥 Pre-merge checks | ✅ 13 | ❌ 2

❌ Failed checks (2 warnings)

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.
Microshift Test Compatibility ⚠️ Warning project-dashboard.spec.ts creates a console.openshift.io ConsoleLink CR and expects DeploymentConfig inventory; both are OpenShift-only and there’s no MicroShift skip/guard. Gate this suite with a MicroShift skip or remove OpenShift-only coverage; use only supported resources (Route/SCC/K8s core) on MicroShift.
✅ Passed checks (13 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: migrating dashboard Cypress tests to Playwright.
Description check ✅ Passed The description covers the required sections and clearly explains the migration, setup, and test cases; only screenshots and browser checks are incomplete.
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 All test titles are static strings; dynamic namespace/date values appear only in setup/assertions, not in titles.
Test Structure And Quality ✅ Passed PR only touches Playwright/TypeScript e2e code and shared helpers; no Ginkgo tests or Go Eventually/BeforeEach patterns are changed.
Single Node Openshift (Sno) Test Compatibility ✅ Passed These are Playwright specs, not Ginkgo; I found no multi-node/HA assumptions or SNO-unsafe patterns in the new dashboard tests.
Topology-Aware Scheduling Compatibility ✅ Passed Only frontend e2e/UI dashboard tests and selectors changed; no deployment/controller manifests or scheduling constraints were added.
Ote Binary Stdout Contract ✅ Passed No touched file adds stdout writes in process-level code; remaining console.warn/error calls are in fixture teardown, not main/TestMain/BeforeSuite setup.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The new Playwright tests use only cluster/console routes and K8s APIs; no IPv4 literals, IPv4-only parsing, or external-network calls were added.
No-Weak-Crypto ✅ Passed Searched all modified files for weak algorithms, custom crypto, and timing-safe comparison patterns; none were present. Auth code only base64-encodes Basic auth credentials.
Container-Privileges ✅ Passed No changed files add privileged K8s/container settings; scans of all touched TS/TSX files found no privileged, hostPID/Network/IPC, SYS_ADMIN, or allowPrivilegeEscalation fields.
No-Sensitive-Data-In-Logs ✅ Passed No new sensitive logging found: changed files add no log statements; existing warnings/errors are generic and only mention test/resource names, not secrets or PII.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot requested review from jhadvig and rawagner June 23, 2026 15:44
@openshift-ci openshift-ci Bot added component/core Related to console core functionality component/dashboard Related to dashboard approved Indicates a PR has been approved by an approver from all required OWNERS files. component/shared Related to console-shared kind/cypress Related to Cypress e2e integration testing labels Jun 23, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@frontend/e2e/tests/console/dashboards/project-dashboard.spec.ts`:
- Line 5: The namespace constant is using only Date.now() for uniqueness, which
can result in collisions when tests run in parallel across multiple workers.
Enhance the uniqueness of the namespace variable by appending an additional
random identifier such as a random number or UUID to the existing
timestamp-based string, ensuring that concurrent test runs generate distinct
namespaces and avoid interference.
🪄 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: 40c29520-233d-43d6-a219-57ce5fcc1f3a

📥 Commits

Reviewing files that changed from the base of the PR and between 329e322 and 437fc5a.

📒 Files selected for processing (19)
  • frontend/e2e/clients/kubernetes-client.ts
  • frontend/e2e/fixtures/cleanup-fixture.ts
  • frontend/e2e/pages/cluster-dashboard-page.ts
  • frontend/e2e/pages/project-dashboard-page.ts
  • frontend/e2e/tests/console/dashboards/cluster-dashboard.spec.ts
  • frontend/e2e/tests/console/dashboards/project-dashboard.spec.ts
  • frontend/packages/console-shared/src/components/dashboard/utilization-card/UtilizationDurationDropdown.tsx
  • frontend/packages/console-shared/src/components/dashboard/utilization-card/UtilizationItem.tsx
  • frontend/packages/integration-tests/tests/dashboards/cluster-dashboard.cy.ts
  • frontend/packages/integration-tests/tests/dashboards/insights-popup.cy.ts
  • frontend/packages/integration-tests/tests/dashboards/project-dashboard.cy.ts
  • frontend/public/components/dashboard/dashboards-page/cluster-dashboard/details-card.tsx
  • frontend/public/components/dashboard/dashboards-page/cluster-dashboard/inventory-card.tsx
  • frontend/public/components/dashboard/dashboards-page/cluster-dashboard/status-card.tsx
  • frontend/public/components/dashboard/project-dashboard/details-card.tsx
  • frontend/public/components/dashboard/project-dashboard/inventory-card.tsx
  • frontend/public/components/dashboard/project-dashboard/launcher-card.tsx
  • frontend/public/components/dashboard/project-dashboard/resource-quota-card.tsx
  • frontend/public/components/dashboard/project-dashboard/status-card.tsx
💤 Files with no reviewable changes (3)
  • frontend/packages/integration-tests/tests/dashboards/project-dashboard.cy.ts
  • frontend/packages/integration-tests/tests/dashboards/insights-popup.cy.ts
  • frontend/packages/integration-tests/tests/dashboards/cluster-dashboard.cy.ts

import { warmupSPA } from '../../../pages/base-page';
import { ProjectDashboardPage } from '../../../pages/project-dashboard-page';

const namespace = `test-project-dashboard-${Date.now()}`;

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.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Avoid namespace collisions across concurrent runs.

Line 5 uses only Date.now() for uniqueness. Parallel workers/projects can still collide and share the same namespace, which can cause flaky create/delete interference.

Suggested fix
-const namespace = `test-project-dashboard-${Date.now()}`;
+const namespace = `test-project-dashboard-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const namespace = `test-project-dashboard-${Date.now()}`;
const namespace = `test-project-dashboard-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
🤖 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/dashboards/project-dashboard.spec.ts` at line 5,
The namespace constant is using only Date.now() for uniqueness, which can result
in collisions when tests run in parallel across multiple workers. Enhance the
uniqueness of the namespace variable by appending an additional random
identifier such as a random number or UUID to the existing timestamp-based
string, ensuring that concurrent test runs generate distinct namespaces and
avoid interference.

@rhamilto

Copy link
Copy Markdown
Member Author

/retest

@rhamilto

Copy link
Copy Markdown
Member Author

/tech debt
/label docs-approved
/label px-approved

@rhamilto

Copy link
Copy Markdown
Member Author

/verified by CI

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

Copy link
Copy Markdown
Contributor

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

@openshift-ci openshift-ci Bot added docs-approved Signifies that Docs has signed off on this PR px-approved Signifies that Product Support has signed off on this PR labels Jun 24, 2026

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

/lgtm

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

openshift-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fsgreco, rhamilto

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

The pull request process is described 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

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 28f9ca4 and 2 for PR HEAD 437fc5a in total

@rhamilto

Copy link
Copy Markdown
Member Author

/retest

2 similar comments
@rhamilto

Copy link
Copy Markdown
Member Author

/retest

@rhamilto

Copy link
Copy Markdown
Member Author

/retest

@rhamilto

Copy link
Copy Markdown
Member Author

/test e2e-gcp-console

@rhamilto

Copy link
Copy Markdown
Member Author

/retest

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 1aa76c1 and 1 for PR HEAD 437fc5a in total

@rhamilto

Copy link
Copy Markdown
Member Author

/retest

@rhamilto

Copy link
Copy Markdown
Member Author

/retest

1 similar comment
@rhamilto

Copy link
Copy Markdown
Member Author

/retest

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 26, 2026
Migrate cluster-dashboard.cy.ts (8 tests) and project-dashboard.cy.ts
(8 tests) to Playwright, completing the CONSOLE-5283 story.

- Add data-test attributes alongside existing data-test-id on dashboard
  card components (details, status, inventory, utilization, launcher,
  resource-quotas, duration-select) for both cluster and project dashboards
- Create ProjectDashboardPage page object and extend ClusterDashboardPage
  with locators for all dashboard card elements
- Add createResourceQuota/deleteResourceQuota to KubernetesClient and
  ResourceQuota cleanup handling to the cleanup fixture
- Delete original Cypress test files (including previously migrated
  insights-popup.cy.ts)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Jun 29, 2026
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 29, 2026
@openshift-ci

openshift-ci Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 29, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

@rhamilto: This pull request references CONSOLE-5283 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-5283 — Migrate console e2e dashboard tests from Cypress to Playwright.

Solution description:
Migrate cluster-dashboard.cy.ts (8 tests) and project-dashboard.cy.ts (8 tests) to Playwright.

  • Add data-test attributes alongside existing data-test-id on dashboard card components (details, status, inventory, utilization, launcher, resource-quotas, duration-select) for both cluster and project dashboards
  • Create ProjectDashboardPage page object and extend ClusterDashboardPage with locators for all dashboard card elements
  • Add createResourceQuota/deleteResourceQuota to KubernetesClient and ResourceQuota cleanup handling to the cleanup fixture
  • Delete original Cypress test files (including previously migrated insights-popup.cy.ts)

Screenshots / screen recording:

Test setup:
Requires a running OpenShift cluster with e2e/.env configured.

Test cases:

  • Run npx playwright test --project=console frontend/e2e/tests/console/dashboards/ — all 16 tests should pass
  • Cluster Dashboard: Details Card fields, View settings link, Status Card alerts link, health indicators, Inventory Card items, Utilization Card items, duration dropdown
  • Project Dashboard: Details Card fields, View all link, Status Card Active status, Inventory Card items, Utilization Card items, duration dropdown, Launcher Card with ConsoleLink CR, Resource Quotas Card

Browser conformance:

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

Additional info:
N/A

Summary by CodeRabbit

  • Tests
  • Added end-to-end test coverage for the cluster dashboard validating details, status, inventory, utilization, and navigation links
  • Added end-to-end test coverage for the project dashboard, including launcher and resource quota display checks
  • Removed legacy Cypress integration suites for cluster/project dashboard and insights popup
  • Chores
  • Added/extended dashboard page objects and locators to improve test reliability
  • Updated dashboard UI elements with additional data-test attributes (including utilization duration and item containers)

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: 1

🤖 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 `@frontend/e2e/clients/kubernetes-client.ts`:
- Around line 621-640: The polling helper in waitForPodReady is swallowing every
readNamespacedPod failure and converting it to false, which hides
RBAC/auth/network/server errors until timeout. Update waitForPodReady, and the
other polling helper mentioned in the same diff, to catch the read error from
this.k8sApi.readNamespacedPod and only continue polling when it is a
not-found/404 case; for any other error, rethrow immediately. Use the existing
waitForPodReady symbol and the shared pollUntil callback structure to keep the
logic localized.
🪄 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: 488bb54b-d1ae-4bef-b4ca-aa2bab65b2d8

📥 Commits

Reviewing files that changed from the base of the PR and between 437fc5a and f4d398f.

📒 Files selected for processing (19)
  • frontend/e2e/clients/kubernetes-client.ts
  • frontend/e2e/fixtures/cleanup-fixture.ts
  • frontend/e2e/pages/cluster-dashboard-page.ts
  • frontend/e2e/pages/project-dashboard-page.ts
  • frontend/e2e/tests/console/dashboards/cluster-dashboard.spec.ts
  • frontend/e2e/tests/console/dashboards/project-dashboard.spec.ts
  • frontend/packages/console-shared/src/components/dashboard/utilization-card/UtilizationDurationDropdown.tsx
  • frontend/packages/console-shared/src/components/dashboard/utilization-card/UtilizationItem.tsx
  • frontend/packages/integration-tests/tests/dashboards/cluster-dashboard.cy.ts
  • frontend/packages/integration-tests/tests/dashboards/insights-popup.cy.ts
  • frontend/packages/integration-tests/tests/dashboards/project-dashboard.cy.ts
  • frontend/public/components/dashboard/dashboards-page/cluster-dashboard/details-card.tsx
  • frontend/public/components/dashboard/dashboards-page/cluster-dashboard/inventory-card.tsx
  • frontend/public/components/dashboard/dashboards-page/cluster-dashboard/status-card.tsx
  • frontend/public/components/dashboard/project-dashboard/details-card.tsx
  • frontend/public/components/dashboard/project-dashboard/inventory-card.tsx
  • frontend/public/components/dashboard/project-dashboard/launcher-card.tsx
  • frontend/public/components/dashboard/project-dashboard/resource-quota-card.tsx
  • frontend/public/components/dashboard/project-dashboard/status-card.tsx
💤 Files with no reviewable changes (3)
  • frontend/packages/integration-tests/tests/dashboards/cluster-dashboard.cy.ts
  • frontend/packages/integration-tests/tests/dashboards/insights-popup.cy.ts
  • frontend/packages/integration-tests/tests/dashboards/project-dashboard.cy.ts
✅ Files skipped from review due to trivial changes (9)
  • frontend/public/components/dashboard/project-dashboard/resource-quota-card.tsx
  • frontend/public/components/dashboard/dashboards-page/cluster-dashboard/details-card.tsx
  • frontend/public/components/dashboard/project-dashboard/status-card.tsx
  • frontend/public/components/dashboard/project-dashboard/launcher-card.tsx
  • frontend/packages/console-shared/src/components/dashboard/utilization-card/UtilizationDurationDropdown.tsx
  • frontend/public/components/dashboard/dashboards-page/cluster-dashboard/inventory-card.tsx
  • frontend/packages/console-shared/src/components/dashboard/utilization-card/UtilizationItem.tsx
  • frontend/public/components/dashboard/project-dashboard/inventory-card.tsx
  • frontend/public/components/dashboard/project-dashboard/details-card.tsx
🚧 Files skipped from review as they are similar to previous changes (5)
  • frontend/e2e/fixtures/cleanup-fixture.ts
  • frontend/public/components/dashboard/dashboards-page/cluster-dashboard/status-card.tsx
  • frontend/e2e/pages/project-dashboard-page.ts
  • frontend/e2e/pages/cluster-dashboard-page.ts
  • frontend/e2e/tests/console/dashboards/cluster-dashboard.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: 1

🤖 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 `@frontend/e2e/clients/kubernetes-client.ts`:
- Around line 621-640: The polling helper in waitForPodReady is swallowing every
readNamespacedPod failure and converting it to false, which hides
RBAC/auth/network/server errors until timeout. Update waitForPodReady, and the
other polling helper mentioned in the same diff, to catch the read error from
this.k8sApi.readNamespacedPod and only continue polling when it is a
not-found/404 case; for any other error, rethrow immediately. Use the existing
waitForPodReady symbol and the shared pollUntil callback structure to keep the
logic localized.
🪄 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: 488bb54b-d1ae-4bef-b4ca-aa2bab65b2d8

📥 Commits

Reviewing files that changed from the base of the PR and between 437fc5a and f4d398f.

📒 Files selected for processing (19)
  • frontend/e2e/clients/kubernetes-client.ts
  • frontend/e2e/fixtures/cleanup-fixture.ts
  • frontend/e2e/pages/cluster-dashboard-page.ts
  • frontend/e2e/pages/project-dashboard-page.ts
  • frontend/e2e/tests/console/dashboards/cluster-dashboard.spec.ts
  • frontend/e2e/tests/console/dashboards/project-dashboard.spec.ts
  • frontend/packages/console-shared/src/components/dashboard/utilization-card/UtilizationDurationDropdown.tsx
  • frontend/packages/console-shared/src/components/dashboard/utilization-card/UtilizationItem.tsx
  • frontend/packages/integration-tests/tests/dashboards/cluster-dashboard.cy.ts
  • frontend/packages/integration-tests/tests/dashboards/insights-popup.cy.ts
  • frontend/packages/integration-tests/tests/dashboards/project-dashboard.cy.ts
  • frontend/public/components/dashboard/dashboards-page/cluster-dashboard/details-card.tsx
  • frontend/public/components/dashboard/dashboards-page/cluster-dashboard/inventory-card.tsx
  • frontend/public/components/dashboard/dashboards-page/cluster-dashboard/status-card.tsx
  • frontend/public/components/dashboard/project-dashboard/details-card.tsx
  • frontend/public/components/dashboard/project-dashboard/inventory-card.tsx
  • frontend/public/components/dashboard/project-dashboard/launcher-card.tsx
  • frontend/public/components/dashboard/project-dashboard/resource-quota-card.tsx
  • frontend/public/components/dashboard/project-dashboard/status-card.tsx
💤 Files with no reviewable changes (3)
  • frontend/packages/integration-tests/tests/dashboards/cluster-dashboard.cy.ts
  • frontend/packages/integration-tests/tests/dashboards/insights-popup.cy.ts
  • frontend/packages/integration-tests/tests/dashboards/project-dashboard.cy.ts
✅ Files skipped from review due to trivial changes (9)
  • frontend/public/components/dashboard/project-dashboard/resource-quota-card.tsx
  • frontend/public/components/dashboard/dashboards-page/cluster-dashboard/details-card.tsx
  • frontend/public/components/dashboard/project-dashboard/status-card.tsx
  • frontend/public/components/dashboard/project-dashboard/launcher-card.tsx
  • frontend/packages/console-shared/src/components/dashboard/utilization-card/UtilizationDurationDropdown.tsx
  • frontend/public/components/dashboard/dashboards-page/cluster-dashboard/inventory-card.tsx
  • frontend/packages/console-shared/src/components/dashboard/utilization-card/UtilizationItem.tsx
  • frontend/public/components/dashboard/project-dashboard/inventory-card.tsx
  • frontend/public/components/dashboard/project-dashboard/details-card.tsx
🚧 Files skipped from review as they are similar to previous changes (5)
  • frontend/e2e/fixtures/cleanup-fixture.ts
  • frontend/public/components/dashboard/dashboards-page/cluster-dashboard/status-card.tsx
  • frontend/e2e/pages/project-dashboard-page.ts
  • frontend/e2e/pages/cluster-dashboard-page.ts
  • frontend/e2e/tests/console/dashboards/cluster-dashboard.spec.ts
🛑 Comments failed to post (1)
frontend/e2e/clients/kubernetes-client.ts (1)

621-640: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Fail fast on non-404 API errors in the polling helpers.

Both waits currently turn every read failure into false, so RBAC/auth/network/server errors get hidden until the full timeout expires. Only the “resource not there yet” case should keep polling; everything else should be rethrown immediately.

Suggested fix
   async waitForPodReady(name: string, namespace: string, timeoutMs = 120_000): Promise<boolean> {
     return pollUntil(
       async () => {
         try {
           const pod = await this.k8sApi.readNamespacedPod({ name, namespace });
           if (pod?.status?.phase !== 'Running') {
             return false;
           }
           const containers = pod?.status?.containerStatuses;
           if (!containers || containers.length === 0) {
             return false;
           }
           return containers.every((c) => c.ready === true);
-        } catch {
-          return false;
+        } catch (err) {
+          if (isNotFound(err)) {
+            return false;
+          }
+          throw err;
         }
       },
       timeoutMs,
       2_000,
     );
   }
@@
   async waitForDeploymentReady(
     name: string,
     namespace: string,
     timeoutMs = 120_000,
   ): Promise<boolean> {
     return pollUntil(
       async () => {
         try {
           const dep = await this.appsApi.readNamespacedDeployment({ name, namespace });
           const ready = dep?.status?.readyReplicas ?? 0;
           const desired = dep?.spec?.replicas ?? 1;
           return ready >= desired;
-        } catch {
-          return false;
+        } catch (err) {
+          if (isNotFound(err)) {
+            return false;
+          }
+          throw err;
         }
       },
       timeoutMs,
       2_000,
     );
   }

Also applies to: 647-665

🤖 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 621 - 640, The
polling helper in waitForPodReady is swallowing every readNamespacedPod failure
and converting it to false, which hides RBAC/auth/network/server errors until
timeout. Update waitForPodReady, and the other polling helper mentioned in the
same diff, to catch the read error from this.k8sApi.readNamespacedPod and only
continue polling when it is a not-found/404 case; for any other error, rethrow
immediately. Use the existing waitForPodReady symbol and the shared pollUntil
callback structure to keep the logic localized.

@openshift-ci

openshift-ci Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

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

@rhamilto

Copy link
Copy Markdown
Member Author

@fsgreco, mind retagging after rebase?

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality component/dashboard Related to dashboard component/shared Related to console-shared 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.

3 participants