Skip to content

CONSOLE-5417: Migrate dev-console Cypress tests to Playwright (batch 4)#16767

Open
shahsahil264 wants to merge 10 commits into
openshift:mainfrom
shahsahil264:CONSOLE-5417
Open

CONSOLE-5417: Migrate dev-console Cypress tests to Playwright (batch 4)#16767
shahsahil264 wants to merge 10 commits into
openshift:mainfrom
shahsahil264:CONSOLE-5417

Conversation

@shahsahil264

@shahsahil264 shahsahil264 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Analysis / Root cause:

Part of the Cypress → Playwright migration epic (CONSOLE-5196). This is batch 4 of the migration, covering the image vulnerability tests from the dev-console package.

Jira: CONSOLE-5417

Solution description:

Migrates the project-vulnerability.feature Cypress tests to Playwright, covering 4 test scenarios for the Quay Container Security Operator's Image Manifest Vulnerabilities UI:

  • PV-01-TC01: Vulnerability tab shows Image Manifest vulnerabilities table with expected columns
  • PV-01-TC03: Filter in vulnerability tab (Name → Label filter switch)
  • PV-01-TC04: Image manifests vulnerability details page (Details, YAML, Affected Pods tabs; Base image type filter)
  • PV-01-TC05: Vulnerability type filters on IMV details page (App dependency toggle + severity filter options)

PV-01-TC02 was @manual in Cypress and is not migrated.

Key implementation details:

  • Tests require the Quay Container Security Operator — beforeAll checks for the subscription and skips the entire suite if not installed
  • Deployment creation and IMV data polling moved to beforeAll for efficiency (Strategy B isolation)
  • waitForIMVData() polls the K8s API for ImageManifestVuln resources before any UI interaction
  • warmupSPA + switchPerspective('Developer') in beforeEach — Vulnerabilities tab only appears in Developer perspective
  • Quarkus image needs sleep infinity command override and restricted securityContext on OCP 5.0
  • Namespace uses pod-security.kubernetes.io/enforce=restricted label (pod meets restricted profile)

Files added:

  • e2e/pages/dev-console/vulnerability-page.ts — page object with locators and actions
  • e2e/tests/dev-console/vulnerability.spec.ts — test spec with 4 scenarios
  • e2e/utils/operator-check.ts — operator subscription check utility (shared across suites)

Files deleted:

  • 14 Cypress feature files, step definitions, and page objects that were either migrated or tagged @manual/@broken-test
  • e2e/tests/dev-console/fixtures/create-quarkus-deployment.yaml — removed dead code (deployment created inline)

Files modified:

  • e2e/pages/base-page.ts — import expect from fixtures, use getByTestId for perspective switcher
  • public/components/filter-toolbar.tsx — added data-test attribute for getByTestId compatibility

Screenshots / screen recording:

Test setup:

  • Requires Quay Container Security Operator (stable-3.17) installed on the cluster
  • Tests auto-skip if the operator subscription is not found

Test cases:

  • PV-01-TC01: Vulnerability tab with table columns verified
  • PV-01-TC03: Filter switch from Name to Label verified
  • PV-01-TC04: IMV details page with tabs and Base image type filter verified
  • PV-01-TC05: App dependency type filter toggle + severity filter options verified
  • All 4 tests pass consistently (3 consecutive runs)
  • TypeScript compilation clean
  • ESLint clean

Browser conformance:

  • Chrome

Additional info:

  • Tests validated on ephemeral OCP 5.0 CI cluster with Quay CSO v3.17.3
  • Migration follows all rules from CLAUDE.md and /migrate-cypress skill

Reviewers and assignees:
/cc @rhamilto

shahsahil264 and others added 4 commits July 10, 2026 13:02
Migrate vulnerability spec (4 tests) with VulnerabilityPage page object.
Delete 13 Cypress features that were @broken-test/@to-do/@Manual
(CRW, operators, getting-started-tour, project-access, service-mesh,
virtualization) — no Playwright equivalents needed.

Add data-test attrs to filter-toolbar.tsx for filter-dropdown-toggle
and row-filter checkboxes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The quarkus test image requires privileged PodSecurity to run.
Also adds exact:true to Create button to avoid strict mode violation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Move deployment creation to beforeAll with waitForIMVData polling
- Add warmupSPA + switchPerspective('Developer') in beforeEach
- Replace [id] and [aria-label] selectors with getByRole where possible
- Adapt TC05 to use vulnerability type toggle buttons (OCP 5.0 UI)
- Remove 8 unused methods and 2 dead locator properties
- Add sleep infinity + restricted securityContext for quarkus on OCP 5.0

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

Copy link
Copy Markdown
Contributor

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

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

This repository is configured in: LGTM mode

@openshift-ci
openshift-ci Bot requested a review from rhamilto July 15, 2026 19:28
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 15, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

@shahsahil264: This pull request references CONSOLE-5417 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 sub-task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Analysis / Root cause:

Part of the Cypress → Playwright migration epic (CONSOLE-5196). This is batch 4 of the migration, covering the image vulnerability tests from the dev-console package.

Jira: CONSOLE-5417

Solution description:

Migrates the project-vulnerability.feature Cypress tests to Playwright, covering 4 test scenarios for the Quay Container Security Operator's Image Manifest Vulnerabilities UI:

  • PV-01-TC01: Vulnerability tab shows Image Manifest vulnerabilities table with expected columns
  • PV-01-TC03: Filter in vulnerability tab (Name → Label filter switch)
  • PV-01-TC04: Image manifests vulnerability details page (Details, YAML, Affected Pods tabs; Base image type filter)
  • PV-01-TC05: Vulnerability type filters on IMV details page (App dependency toggle)

PV-01-TC02 was @manual in Cypress and is not migrated.

Key implementation details:

  • Tests require the Quay Container Security Operator — beforeAll checks for the subscription and skips the entire suite if not installed
  • Deployment creation and IMV data polling moved to beforeAll for efficiency (Strategy B isolation)
  • waitForIMVData() polls the K8s API for ImageManifestVuln resources before any UI interaction
  • warmupSPA + switchPerspective('Developer') in beforeEach — Vulnerabilities tab only appears in Developer perspective
  • Quarkus image needs sleep infinity command override and restricted securityContext on OCP 5.0
  • Namespace requires pod-security.kubernetes.io/enforce=privileged label

Files added:

  • e2e/pages/dev-console/vulnerability-page.ts — page object with locators and actions
  • e2e/tests/dev-console/vulnerability.spec.ts — test spec with 4 scenarios
  • e2e/tests/dev-console/fixtures/create-quarkus-deployment.yaml — deployment manifest
  • e2e/tests/dev-console/utils/operator-check.ts — operator subscription check utility

Files deleted:

  • 14 Cypress feature files, step definitions, and page objects that were either migrated or tagged @manual/@broken-test

Files modified:

  • e2e/pages/base-page.ts — added data-test alongside data-test-id on filter-toolbar toggle
  • public/components/filter-toolbar.tsx — added data-test attribute for getByTestId compatibility

Screenshots / screen recording:

Test setup:

  • Requires Quay Container Security Operator (stable-3.17) installed on the cluster
  • Tests auto-skip if the operator subscription is not found

Test cases:

  • PV-01-TC01: Vulnerability tab with table columns verified
  • PV-01-TC03: Filter switch from Name to Label verified
  • PV-01-TC04: IMV details page with tabs and Base image type filter verified
  • PV-01-TC05: App dependency type filter toggle verified
  • All 4 tests pass consistently (3 consecutive runs)
  • TypeScript compilation clean
  • ESLint clean

Browser conformance:

  • Chrome

Additional info:

  • Tests validated on ephemeral OCP 5.0 CI cluster with Quay CSO v3.17.3
  • Migration follows all rules from CLAUDE.md and /migrate-cypress skill

Reviewers and assignees:
/cc @rhamilto

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 the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 15, 2026
@openshift-ci

openshift-ci Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci Bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. component/core Related to console core functionality labels Jul 15, 2026
@openshift-ci

openshift-ci Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

@openshift-ci openshift-ci Bot added the component/dev-console Related to dev-console label Jul 15, 2026
@coderabbitai

coderabbitai Bot commented Jul 15, 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

Added Playwright end-to-end coverage for Dev Console image vulnerabilities, including Kubernetes fixtures, operator detection, page-object helpers, filtering, and detail validation. Updated test selectors and removed selected legacy integration coverage.

Changes

Vulnerability E2E coverage

Layer / File(s) Summary
Selectors and page-object contracts
frontend/e2e/pages/base-page.ts, frontend/public/components/filter-toolbar.tsx, frontend/e2e/pages/dev-console/vulnerability-page.ts
Updated Playwright selectors and added typed vulnerability navigation and interaction helpers.
Kubernetes test setup
frontend/e2e/tests/dev-console/fixtures/create-quarkus-deployment.yaml, frontend/e2e/tests/dev-console/utils/operator-check.ts, frontend/e2e/tests/dev-console/vulnerability.spec.ts
Added a hardened Deployment fixture, Subscription detection, ImageManifestVuln polling, namespace setup, and cleanup.
Vulnerability UI scenarios
frontend/e2e/tests/dev-console/vulnerability.spec.ts
Added coverage for vulnerability tables, filters, image details, tabs, and vulnerability type selection.

Legacy integration test cleanup

Layer / File(s) Summary
Removed legacy integration coverage
frontend/packages/dev-console/integration-tests/features/...
Removed selected legacy VM creation-from-template integration coverage.

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

Sequence Diagram(s)

sequenceDiagram
  participant vulnerability.spec.ts
  participant KubernetesClient
  participant DevConsole
  participant VulnerabilityPage
  vulnerability.spec.ts->>KubernetesClient: create Deployment and poll ImageManifestVuln resources
  KubernetesClient-->>vulnerability.spec.ts: return vulnerability data
  vulnerability.spec.ts->>DevConsole: warm SPA and switch to Developer perspective
  vulnerability.spec.ts->>VulnerabilityPage: navigate and open vulnerability views
  VulnerabilityPage->>DevConsole: interact with tabs, filters, alerts, images, and type buttons
  DevConsole-->>vulnerability.spec.ts: render vulnerability tables and details
Loading

Suggested reviewers: rhamilto

🚥 Pre-merge checks | ✅ 12 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Test Structure And Quality ⚠️ Warning waitForIMVData can poll 180s but repo Playwright timeout is 120s, and afterAll deletes the namespace without waiting for deletion. Add a suite/test timeout above 180s (or shorten the poll) and call waitForNamespaceDeleted after deleteNamespace so cleanup is deterministic.
Microshift Test Compatibility ⚠️ Warning The new suite calls OLM Subscription and IMV CR APIs with no MicroShift tag/guard; only a Quay-subscription skip exists, which isn't a MicroShift protection. Add an explicit MicroShift skip/guard or a MicroShift-skipping tag/apigroup before any operators.coreos.com/secscan.quay.redhat.com API use.
Ipv6 And Disconnected Network Test Compatibility ⚠️ Warning The new vulnerability e2e test creates a Deployment using quay.io/redhat-appstudio-qe/quarkus, so it needs public registry access in disconnected CI. Use an internal/mirrored image or image stream instead of quay.io; if internet access is unavoidable, mark it [Skipped:Disconnected] and verify on the IPv6 disconnected CI job.
✅ Passed checks (12 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 PASS: New Playwright tests use static PV-01-TCxx titles and fixed step names; no interpolated/generated values appear in test names. Dynamic namespace use is confined to setup.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The new Playwright vulnerability tests only use a single replica and standard OpenShift APIs; no multi-node, HA, affinity, drain, or scaling assumptions were found.
Topology-Aware Scheduling Compatibility ✅ Passed The new Deployment is generic: 1 replica, no nodeSelector/affinity/spread constraints/tolerations/PDBs, so it adds no topology-sensitive scheduling assumptions.
Ote Binary Stdout Contract ✅ Passed PASS: The touched file operator-check.ts has no stdout/stderr logging or process-level setup code, so no JSON-stdout contract violation was introduced.
No-Weak-Crypto ✅ Passed Inspected all PR hunks; they only add Playwright tests/page objects, YAML, and data-test attrs. No MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret compares found.
Container-Privileges ✅ Passed The new Deployment manifest is hardened (allowPrivilegeEscalation:false, runAsNonRoot:true, drop ALL); no PR-diff manifest sets privileged/host namespaces/SYS_ADMIN.
No-Sensitive-Data-In-Logs ✅ Passed No new logging or debug prints were added; changed files contain no console/cy logs or sensitive data exposure.
Title check ✅ Passed The title clearly states the batch 4 migration from Cypress to Playwright for dev-console tests and matches the change set.
Description check ✅ Passed The description fills the required sections with root cause, solution, tests, setup, browser conformance, and reviewers, with only minor placeholders left.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

# Conflicts:
#	frontend/e2e/pages/base-page.ts
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 15, 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: 5

🧹 Nitpick comments (1)
frontend/e2e/pages/dev-console/vulnerability-page.ts (1)

75-101: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicate locator construction between getters and click helpers.

clickVulnLink, clickVulnImageLink, and clickVulnerabilityType each re-build the same locator that their corresponding getVulnLink, getVulnImageLink, and getVulnerabilityTypeButton already expose, instead of delegating to them. If a locator changes, both copies must be updated in sync.

♻️ Proposed refactor to reuse the getters
   async clickVulnLink(index: number): Promise<void> {
-    await this.robustClick(this.page.getByTestId(`vuln-${index}`));
+    await this.robustClick(this.getVulnLink(index));
   }

   getVulnImageLink(imageName: string): Locator {
     return this.page.getByRole('link', { name: imageName });
   }

   async clickVulnImageLink(imageName: string): Promise<void> {
-    await this.robustClick(this.page.getByRole('link', { name: imageName }));
+    await this.robustClick(this.getVulnImageLink(imageName));
   }
...
   async clickVulnerabilityType(typeName: string): Promise<void> {
-    await this.robustClick(this.page.getByRole('button', { name: typeName, exact: true }));
+    await this.robustClick(this.getVulnerabilityTypeButton(typeName));
   }
🤖 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/dev-console/vulnerability-page.ts` around lines 75 - 101,
Update clickVulnLink, clickVulnImageLink, and clickVulnerabilityType to pass
their corresponding getVulnLink, getVulnImageLink, and
getVulnerabilityTypeButton results to robustClick instead of rebuilding
locators. Leave the getter locator definitions unchanged.
🤖 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/dev-console/fixtures/create-quarkus-deployment.yaml`:
- Around line 15-30: Update the quarkus container definition in
create-quarkus-deployment.yaml to include CPU and memory resource limits, plus
liveness and readiness probes compatible with the sleep-based container. Use
bounded fixture-appropriate values and probes that reliably report the pod as
healthy and ready, while preserving the existing security settings.
- Around line 15-30: Harden the create-quarkus-deployment fixture by setting the
container securityContext to readOnlyRootFilesystem: true and disabling
service-account token mounting at the pod spec level with
automountServiceAccountToken: false. Keep the existing sleep command and other
security settings unchanged.

In `@frontend/e2e/tests/dev-console/utils/operator-check.ts`:
- Around line 12-28: Update hasOperatorSubscription to return false only when
getCustomResource reports a not-found error for the subscription; rethrow
authentication, RBAC, network, API-server, malformed-response, and all other
unexpected errors so setup fails instead of skipping the suite.

In `@frontend/e2e/tests/dev-console/vulnerability.spec.ts`:
- Around line 15-27: Update waitForIMVData to catch errors from
listCustomResources within each polling iteration and continue retrying until
timeout, preserving the existing success condition and 10-second delay. Only
throw the final timeout error after the full 180-second window expires, rather
than propagating transient API or CRD-registration failures immediately.
- Around line 41-43: Update the namespace options in the test setup around
k8sClient.createNamespace to use the least-permissive pod security enforcement
level, preferably restricted or baseline, since the fixture pod already
complies. Retain privileged only if another fixture requires it, and document
that requirement with a brief note.

---

Nitpick comments:
In `@frontend/e2e/pages/dev-console/vulnerability-page.ts`:
- Around line 75-101: Update clickVulnLink, clickVulnImageLink, and
clickVulnerabilityType to pass their corresponding getVulnLink,
getVulnImageLink, and getVulnerabilityTypeButton results to robustClick instead
of rebuilding locators. Leave the getter locator definitions unchanged.
🪄 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: 935e9232-80c0-47ae-8df8-b613c0c31bf3

📥 Commits

Reviewing files that changed from the base of the PR and between a773865 and 6f819f3.

📒 Files selected for processing (25)
  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/pages/dev-console/vulnerability-page.ts
  • frontend/e2e/tests/dev-console/fixtures/create-quarkus-deployment.yaml
  • frontend/e2e/tests/dev-console/utils/operator-check.ts
  • frontend/e2e/tests/dev-console/vulnerability.spec.ts
  • frontend/packages/dev-console/integration-tests/features/codeready-workspaces/crw-basic.feature
  • frontend/packages/dev-console/integration-tests/features/codeready-workspaces/open-app-in-crw.feature
  • frontend/packages/dev-console/integration-tests/features/common/operators.feature
  • frontend/packages/dev-console/integration-tests/features/getting-started/getting-started-to-dev-perspective.feature
  • frontend/packages/dev-console/integration-tests/features/getting-started/getting-started-tour-dev-perspective.feature
  • frontend/packages/dev-console/integration-tests/features/project/project-access.feature
  • frontend/packages/dev-console/integration-tests/features/service-mesh/service-mesh-console-links-admin.feature
  • frontend/packages/dev-console/integration-tests/features/service-mesh/service-mesh-console-links-nonadmin.feature
  • frontend/packages/dev-console/integration-tests/features/virtulization/actions-on-vm.feature
  • frontend/packages/dev-console/integration-tests/features/virtulization/create-vm-from-template.feature
  • frontend/packages/dev-console/integration-tests/features/virtulization/virtual-machines-page.feature
  • frontend/packages/dev-console/integration-tests/features/virtulization/virtual-machines-template.feature
  • frontend/packages/dev-console/integration-tests/features/vulnerability/project-vulnerability.feature
  • frontend/packages/dev-console/integration-tests/support/pageObjects/vulnerability-po.ts
  • frontend/packages/dev-console/integration-tests/support/pages/crw/authorizeAccess.ts
  • frontend/packages/dev-console/integration-tests/support/pages/crw/keycloak.ts
  • frontend/packages/dev-console/integration-tests/support/step-definitions/crw/crw-basic.ts
  • frontend/packages/dev-console/integration-tests/support/step-definitions/getting-started/getting-started-tour-dev-perspective.ts
  • frontend/packages/dev-console/integration-tests/support/step-definitions/vulnerability/project-vulnerability.ts
  • frontend/public/components/filter-toolbar.tsx
💤 Files with no reviewable changes (19)
  • frontend/packages/dev-console/integration-tests/support/pageObjects/vulnerability-po.ts
  • frontend/packages/dev-console/integration-tests/support/step-definitions/crw/crw-basic.ts
  • frontend/packages/dev-console/integration-tests/features/virtulization/virtual-machines-page.feature
  • frontend/packages/dev-console/integration-tests/support/pages/crw/keycloak.ts
  • frontend/packages/dev-console/integration-tests/features/virtulization/create-vm-from-template.feature
  • frontend/packages/dev-console/integration-tests/features/getting-started/getting-started-to-dev-perspective.feature
  • frontend/packages/dev-console/integration-tests/features/codeready-workspaces/open-app-in-crw.feature
  • frontend/packages/dev-console/integration-tests/features/project/project-access.feature
  • frontend/packages/dev-console/integration-tests/features/virtulization/virtual-machines-template.feature
  • frontend/packages/dev-console/integration-tests/features/vulnerability/project-vulnerability.feature
  • frontend/packages/dev-console/integration-tests/features/codeready-workspaces/crw-basic.feature
  • frontend/packages/dev-console/integration-tests/features/service-mesh/service-mesh-console-links-nonadmin.feature
  • frontend/packages/dev-console/integration-tests/support/step-definitions/getting-started/getting-started-tour-dev-perspective.ts
  • frontend/packages/dev-console/integration-tests/features/common/operators.feature
  • frontend/packages/dev-console/integration-tests/features/getting-started/getting-started-tour-dev-perspective.feature
  • frontend/packages/dev-console/integration-tests/support/pages/crw/authorizeAccess.ts
  • frontend/packages/dev-console/integration-tests/features/service-mesh/service-mesh-console-links-admin.feature
  • frontend/packages/dev-console/integration-tests/features/virtulization/actions-on-vm.feature
  • frontend/packages/dev-console/integration-tests/support/step-definitions/vulnerability/project-vulnerability.ts

Comment thread frontend/e2e/tests/dev-console/fixtures/create-quarkus-deployment.yaml Outdated
Comment thread frontend/e2e/utils/operator-check.ts
Comment thread frontend/e2e/tests/dev-console/vulnerability.spec.ts
Comment thread frontend/e2e/tests/dev-console/vulnerability.spec.ts
@shahsahil264

Copy link
Copy Markdown
Contributor Author

/test e2e-gcp-console
/test e2e-playwright

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
putComment timed out

shahsahil264 and others added 2 commits July 15, 2026 15:41
- Add resource limits, probes, readOnlyRootFilesystem to quarkus fixture
- Set automountServiceAccountToken: false on pod spec
- Use restricted PSA level instead of privileged (container complies)
- Rethrow non-404 errors in hasOperatorSubscription
- Catch transient API errors in waitForIMVData polling loop
- Reuse getter methods in click helpers to avoid locator duplication

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

Copy link
Copy Markdown
Contributor Author

/test e2e-gcp-console
/test e2e-playwright

@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

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
frontend/e2e/tests/dev-console/utils/operator-check.ts (1)

35-59: ⚠️ Potential issue | 🟠 Major

Do not treat every CSV-list failure as “not ready.”

Lines 56–58 convert RBAC, authentication, network, API-server, and malformed-response errors into false. This can make a broken cluster look like an unavailable operator or cause polling to time out without the real cause. Return false only for the expected not-found case and rethrow other errors, or handle transient retries in the caller.

🤖 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/dev-console/utils/operator-check.ts` around lines 35 - 59,
Update hasCSVReady so it returns false only when listCustomResources reports the
expected not-found condition; rethrow authentication, authorization, network,
API-server, and malformed-response errors instead of swallowing them. Preserve
the existing CSV matching and readiness behavior for successful responses.
🤖 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.

Outside diff comments:
In `@frontend/e2e/tests/dev-console/utils/operator-check.ts`:
- Around line 35-59: Update hasCSVReady so it returns false only when
listCustomResources reports the expected not-found condition; rethrow
authentication, authorization, network, API-server, and malformed-response
errors instead of swallowing them. Preserve the existing CSV matching and
readiness behavior for successful responses.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: aaa23f1e-81c7-47be-ad92-39232bd8e836

📥 Commits

Reviewing files that changed from the base of the PR and between 6f819f3 and 6eab3f5.

📒 Files selected for processing (5)
  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/pages/dev-console/vulnerability-page.ts
  • frontend/e2e/tests/dev-console/fixtures/create-quarkus-deployment.yaml
  • frontend/e2e/tests/dev-console/utils/operator-check.ts
  • frontend/e2e/tests/dev-console/vulnerability.spec.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • frontend/e2e/tests/dev-console/fixtures/create-quarkus-deployment.yaml
  • frontend/e2e/pages/dev-console/vulnerability-page.ts
  • frontend/e2e/tests/dev-console/vulnerability.spec.ts

…Subscription

- Restore vulnerability-po.ts deleted by migration — still imported by
  Cypress barrel export in pageObjects/index.ts
- Broaden 404 detection to handle @kubernetes/client-node error format
  where statusCode may be in .code or error message string

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: 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/dev-console/utils/operator-check.ts`:
- Around line 22-31: The not-found detection in the operator-check error
handling is too broad because msg.includes('404') can classify unrelated errors
as missing subscriptions. Update the fallback after the structured code check to
use only a bounded, explicit not-found message pattern, or remove the message
fallback entirely, while preserving the existing structured status-field
handling and false return for genuine 404 responses.
🪄 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: 85e86d98-6dfa-4afc-b72e-7b92f2e4bf11

📥 Commits

Reviewing files that changed from the base of the PR and between b89437e and be13f30.

📒 Files selected for processing (1)
  • frontend/e2e/tests/dev-console/utils/operator-check.ts

Comment thread frontend/e2e/tests/dev-console/utils/operator-check.ts Outdated
Structured .code check already covers ApiException from
@kubernetes/client-node. Message matching was too broad.

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

Copy link
Copy Markdown
Contributor Author

/test e2e-gcp-console
/test e2e-playwright

@shahsahil264
shahsahil264 marked this pull request as ready for review July 16, 2026 14:22
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 16, 2026
@shahsahil264

Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@shahsahil264

Copy link
Copy Markdown
Contributor Author

/retest

@openshift-ci

openshift-ci Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

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

Comment thread frontend/e2e/tests/dev-console/fixtures/create-quarkus-deployment.yaml Outdated
Comment thread frontend/e2e/pages/base-page.ts
Comment thread frontend/e2e/tests/dev-console/vulnerability.spec.ts
Comment thread frontend/e2e/tests/dev-console/vulnerability.spec.ts
Comment thread frontend/e2e/tests/dev-console/utils/operator-check.ts Outdated
Comment thread frontend/e2e/tests/dev-console/vulnerability.spec.ts
Comment thread frontend/e2e/tests/dev-console/fixtures/create-quarkus-deployment.yaml Outdated
Comment thread frontend/public/components/filter-toolbar.tsx
- Delete unused create-quarkus-deployment.yaml fixture (dead code,
  hardcoded namespace, inconsistent probes vs inline spec)
- Move operator-check.ts to e2e/utils/ for cross-suite reuse
- Add severity filter assertions to TC05 for feature parity
  with original Cypress test
- Add getFilterOption() to VulnerabilityPage for locator reuse

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

Copy link
Copy Markdown
Contributor Author

/test e2e-gcp-console
/test e2e-playwright

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 component/dev-console Related to dev-console jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants