Skip to content

CONSOLE-5240: Migrate Helm Cypress E2E tests to Playwright#16711

Open
vikram-raj wants to merge 2 commits into
openshift:mainfrom
vikram-raj:console-5240
Open

CONSOLE-5240: Migrate Helm Cypress E2E tests to Playwright#16711
vikram-raj wants to merge 2 commits into
openshift:mainfrom
vikram-raj:console-5240

Conversation

@vikram-raj

@vikram-raj vikram-raj commented Jul 6, 2026

Copy link
Copy Markdown
Member

Analysis / Root cause:
The Helm E2E tests were still using Cypress and needed migration to Playwright as part of the overall test migration effort. Some tests were experiencing flakiness due to timing issues with async operations.

Solution description:

  • Migrated Helm Cypress E2E tests to Playwright following the project's testing standards
  • Improved test reliability by:
    • Adding explicit waits for dropdown menu visibility after kebab menu clicks
    • Increasing timeouts for helm operations (install, upgrade, rollback) from 30s to 60s
    • Waiting for button progress indicators to detach before proceeding
    • Waiting for deployment status before checking menu items
    • Removing premature waitForLoadingComplete() call that could cause race conditions

Screenshots / screen recording:

Test setup:

  1. Ensure you have a running OpenShift cluster with helm support
  2. Run: cd frontend && yarn test:e2e --grep @helm

Test cases:

  • ✅ Shows empty state when no helm releases exist (HR-05-TC01)
  • ✅ Displays Create Helm Release page details (HR-05-TC02)
  • ✅ Installs Helm Chart from catalog (HR-06-TC04)
  • ✅ Verifies helm release is listed (HR-05-TC05)
  • ✅ Verifies status icons (HR-01-TC04)
  • ✅ Filters by Deployed status (HR-05-TC06)
  • ✅ Verifies details page tabs and actions (HR-05-TC13)
  • ✅ Upgrades helm release via kebab menu (HR-08-TC04)
  • ✅ Verifies kebab menu actions after upgrade (HR-08-TC01)
  • ✅ Rollback helm release (HR-08-TC03)
  • ✅ Deletes helm release (HR-01-TC03)

Browser conformance:

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

Additional info:
This PR includes two commits:

  1. Main migration of Helm Cypress tests to Playwright
  2. Follow-up reliability improvements based on test execution findings

Reviewers and assignees:

Summary by CodeRabbit

  • New Features

    • Added end-to-end coverage for Helm release pages, including release lists, catalog creation, details, upgrades, rollbacks, and deletion flows.
    • Introduced reusable UI helpers for navigating and verifying Helm release screens.
  • Tests

    • Added a new Playwright smoke test for Helm release lifecycle scenarios.
    • Removed legacy Helm Cypress test scripts, configs, and related test assets.

vikram-raj and others added 2 commits July 2, 2026 22:20
Address CodeRabbit review findings:
- Add rollback success assertion to verify operation completed
- Fix race condition in upgrade confirmation dialog handling
- Remove unused helmReleasesTab variable

These changes prevent potential test flakiness by:
1. Ensuring rollback failures are detected (was silently continuing)
2. Properly waiting for confirmation dialogs that may appear delayed
3. Cleaning up unused code

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@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 6, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@vikram-raj: This pull request references CONSOLE-5240 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:
The Helm E2E tests were still using Cypress and needed migration to Playwright as part of the overall test migration effort. Some tests were experiencing flakiness due to timing issues with async operations.

Solution description:

  • Migrated Helm Cypress E2E tests to Playwright following the project's testing standards
  • Improved test reliability by:
  • Adding explicit waits for dropdown menu visibility after kebab menu clicks
  • Increasing timeouts for helm operations (install, upgrade, rollback) from 30s to 60s
  • Waiting for button progress indicators to detach before proceeding
  • Waiting for deployment status before checking menu items
  • Removing premature waitForLoadingComplete() call that could cause race conditions

Screenshots / screen recording:

Test setup:

  1. Ensure you have a running OpenShift cluster with helm support
  2. Run: cd frontend && yarn test:e2e --grep @helm

Test cases:

  • ✅ Shows empty state when no helm releases exist (HR-05-TC01)
  • ✅ Displays Create Helm Release page details (HR-05-TC02)
  • ✅ Installs Helm Chart from catalog (HR-06-TC04)
  • ✅ Verifies helm release is listed (HR-05-TC05)
  • ✅ Verifies status icons (HR-01-TC04)
  • ✅ Filters by Deployed status (HR-05-TC06)
  • ✅ Verifies details page tabs and actions (HR-05-TC13)
  • ✅ Upgrades helm release via kebab menu (HR-08-TC04)
  • ✅ Verifies kebab menu actions after upgrade (HR-08-TC01)
  • ✅ Rollback helm release (HR-08-TC03)
  • ✅ Deletes helm release (HR-01-TC03)

Browser conformance:

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

Additional info:
This PR includes two commits:

  1. Main migration of Helm Cypress tests to Playwright
  2. Follow-up reliability improvements based on test execution findings

Reviewers and assignees:

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 Jul 6, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

This PR introduces new Playwright page objects (HelmDetailsPage, HelmPage) and an E2E spec covering Helm release install, upgrade, rollback, and delete flows. It also removes the entire legacy Cypress/Cucumber Helm integration test suite, its scripts, configuration files, page objects, step definitions, feature files, and CI wiring.

Changes

Playwright Helm E2E Migration

Layer / File(s) Summary
Helm details page object
frontend/e2e/pages/helm-details-page.ts
Adds HelmDetailsPage with locators and helpers for the actions menu, revision history tab, and delete confirmation flow.
Helm page object: locators, navigation, filtering
frontend/e2e/pages/helm-page.ts
Adds HelmPage locators plus navigation, search, and status-filter helpers for the Helm releases list.
Helm page object: kebab menu, catalog, install
frontend/e2e/pages/helm-page.ts
Adds kebab menu/action selection, catalog navigation, chart selection, and install helpers.
Helm page object: upgrade, rollback, project selection
frontend/e2e/pages/helm-page.ts
Adds chart version upgrade, rollback revision, and namespace/project selection helpers.
Helm release E2E spec
frontend/e2e/tests/helm/helm-release.spec.ts
Adds a spec covering empty state, create-form cancel, and full install/upgrade/rollback/delete lifecycle.
Remove legacy Cypress Helm suite
frontend/package.json, frontend/integration-tests/test-cypress.sh, frontend/packages/helm-plugin/integration-tests/*
Removes Helm Cypress scripts, configs, README, tsconfig, eslintrc, test-data YAML, page objects, step definitions, feature files, and CI nightly/headless steps.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Test as helm-release.spec.ts
  participant HelmPage
  participant HelmDetailsPage
  participant UI as Console UI

  Test->>HelmPage: navigateToCatalog(namespace)
  Test->>HelmPage: searchAndSelectChart(chartName)
  Test->>HelmPage: clickCreateOnSidePane()
  Test->>HelmPage: enterReleaseName(name)
  Test->>HelmPage: clickInstallButton()
  HelmPage->>UI: submit install form
  UI-->>Test: release listed with status

  Test->>HelmPage: clickKebabMenu()
  Test->>HelmPage: selectAction("Upgrade")
  Test->>HelmPage: upgradeChartVersion()
  Test->>HelmPage: clickUpgradeButton()
  UI-->>Test: updated status

  Test->>HelmDetailsPage: clickRevisionHistoryTab()
  Test->>HelmPage: selectRevision()
  Test->>HelmPage: clickRollbackButton()
  UI-->>Test: rollback complete

  Test->>HelmDetailsPage: clickActionsMenu()
  Test->>HelmDetailsPage: enterReleaseNameInDeletePopup(name)
  Test->>HelmDetailsPage: confirmDelete()
  UI-->>Test: navigate to releases list
Loading
🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Test Structure And Quality ⚠️ Warning The lifecycle test bundles install/list/filter/details/upgrade/rollback/delete into one It block, and upgradeChartVersion() can silently no-op if no alternate version exists. Split the Helm lifecycle into narrower tests or focused steps, and make upgradeChartVersion() fail when no selectable upgrade version is available.
✅ Passed checks (14 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: migrating Helm Cypress E2E tests to Playwright.
Description check ✅ Passed The description fills the core required sections and test details, though screenshots and reviewer assignments are left blank.
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 All new test titles are static strings; dynamic namespace values are confined to test bodies, not titles.
Microshift Test Compatibility ✅ Passed The new Helm tests are Playwright UI specs and only use namespaces/console locators; no MicroShift-unsupported APIs, namespaces, or HA assumptions were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR adds Playwright Helm tests, not new Ginkgo e2e tests, and the spec only uses namespaces, Helm installs, and UI checks—no multi-node or HA assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed PR only migrates Helm E2E tests to Playwright; no deployment manifests, controllers, or scheduling constraints (affinity/nodeSelector/PDBs) were added or modified.
Ote Binary Stdout Contract ✅ Passed PR only changes frontend Playwright files; no Go/TestMain/init/suite setup or process-level stdout writes were added.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No IPv4 literals, localhost, IP parsing, or external/public hosts appear in the new Helm Playwright tests; they use relative cluster routes and internal catalog APIs.
No-Weak-Crypto ✅ Passed Changed Helm Playwright test/page-object files contain no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret comparisons.
Container-Privileges ✅ Passed Full PR diff only touches Playwright TS files, a shell script, package.json, and yarn.lock; no container/K8s manifests or disallowed privilege fields appear.
No-Sensitive-Data-In-Logs ✅ Passed Changed Helm Playwright files contain no console/cy.log calls or sensitive literals; I found no logging that would expose secrets or customer data.
✨ 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 stefanonardo and webbnh July 6, 2026 10:55
@openshift-ci

openshift-ci Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vikram-raj

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-ci openshift-ci Bot added component/helm Related to helm-plugin approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 6, 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: 3

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

40-50: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Duplicate filter-item selector logic.

filterByStatus reconstructs the exact same data-ouia-component-id="DataViewCheckboxFilter-filter-item-..." selector already exposed via getFilterDropdownItem (Lines 186-190). Reuse the getter to avoid selector drift between the two.

♻️ Proposed dedup
   async filterByStatus(status: string): Promise<void> {
     const filterToggle = this.dataViewFilters.locator('.pf-v6-c-menu-toggle').first();
     await this.robustClick(filterToggle);
     await this.page.locator('.pf-v6-c-menu__list-item', { hasText: 'Status' }).click();
     await this.robustClick(this.filterDropdown);
-    const filterItem = this.page.locator(
-      `[data-ouia-component-id="DataViewCheckboxFilter-filter-item-${status.toLowerCase()}"]`,
-    );
+    const filterItem = this.getFilterDropdownItem(status);
     await this.robustClick(filterItem);
     await this.robustClick(this.filterDropdown);
   }
🤖 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/helm-page.ts` around lines 40 - 50, The filter-by-status
flow duplicates the `DataViewCheckboxFilter-filter-item-*` selector logic
already centralized in `getFilterDropdownItem`; update `filterByStatus` in
`HelmPage` to reuse that getter instead of reconstructing the
`data-ouia-component-id` string directly. Keep the existing click sequence, but
resolve the item through `getFilterDropdownItem(status)` so selector changes
only need to be made in one place.
frontend/e2e/pages/helm-details-page.ts (1)

71-77: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove the unused verifyActionsInMenu helper

It has no callers in the e2e suite and only scrolls menu items into view; either delete it or replace it with an assertion-based check if it’s meant to validate the menu.

🤖 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/helm-details-page.ts` around lines 71 - 77, The
verifyActionsInMenu helper in HelmDetailsPage is unused and only performs
scrolling without validating anything. Remove the method if it is not needed, or
update it to assert the expected menu items are present using this.actionItems
and the listed actions ('Upgrade', 'Rollback', 'Delete Helm Release') so it
actually verifies the menu state.
frontend/e2e/tests/helm/helm-release.spec.ts (1)

151-158: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicated raw action-item locators instead of reusing the page object.

page.locator('[data-test-action="..."]') is constructed inline here even though HelmPage.selectAction() already encapsulates this exact locator pattern. Consider adding a getActionMenuItem(actionName) getter to HelmPage (mirroring HelmDetailsPage.getActionMenuItem) so the spec doesn't duplicate selector strings.

♻️ Suggested approach
-      const upgradeAction = page.locator('[data-test-action="Upgrade"]');
-      await expect(upgradeAction).toBeVisible({ timeout: 15_000 });
-      await expect(page.locator('[data-test-action="Rollback"]')).toBeVisible();
-      await expect(page.locator('[data-test-action="Delete Helm Release"]')).toBeVisible();
+      await expect(helmPage.getActionMenuItem('Upgrade')).toBeVisible({ timeout: 15_000 });
+      await expect(helmPage.getActionMenuItem('Rollback')).toBeVisible();
+      await expect(helmPage.getActionMenuItem('Delete Helm Release')).toBeVisible();
🤖 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/helm/helm-release.spec.ts` around lines 151 - 158, The
helm release spec is duplicating raw action-menu selectors instead of using the
page object abstraction. Update the verification in helm-release.spec.ts to use
HelmPage for these menu items, and add a getActionMenuItem(actionName) helper on
HelmPage that mirrors HelmDetailsPage.getActionMenuItem so the selector logic
lives in one place. Keep the existing clickKebabMenu and action-name usage, but
replace inline page.locator('[data-test-action="..."]') calls with the shared
helper.
🤖 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/pages/helm-page.ts`:
- Around line 97-103: The upgradeChartVersion method currently silently no-ops
when no alternate chart version is available, allowing the caller to continue as
if an upgrade happened. Update HelmPage.upgradeChartVersion to explicitly handle
the zero-item case by failing or otherwise surfacing that no upgrade target
exists before returning, and keep the existing click-on-first-option behavior
only when console-select-item has entries.

In `@frontend/e2e/tests/helm/helm-release.spec.ts`:
- Around line 107-121: The details-page actions check is missing Rollback
coverage because it manually asserts only Upgrade and Delete. Update the helm
release e2e step to use HelmDetailsPage.verifyActionsInMenu() instead of
individual menu-item checks, so all three actions including Rollback are
verified through the existing helper.
- Around line 160-166: The second upgrade flow in helm-release.spec.ts only
waits for the URL change, so the revision list may still be stale when rollback
is opened. In the upgrade step around clickUpgradeButton() and the following
expect(page).toHaveURL check, add the same post-upgrade wait used earlier to
confirm the release reaches Deployed before proceeding. This should be done in
the test step that performs the second upgrade, so selectRevision() sees the
refreshed revision list.

---

Nitpick comments:
In `@frontend/e2e/pages/helm-details-page.ts`:
- Around line 71-77: The verifyActionsInMenu helper in HelmDetailsPage is unused
and only performs scrolling without validating anything. Remove the method if it
is not needed, or update it to assert the expected menu items are present using
this.actionItems and the listed actions ('Upgrade', 'Rollback', 'Delete Helm
Release') so it actually verifies the menu state.

In `@frontend/e2e/pages/helm-page.ts`:
- Around line 40-50: The filter-by-status flow duplicates the
`DataViewCheckboxFilter-filter-item-*` selector logic already centralized in
`getFilterDropdownItem`; update `filterByStatus` in `HelmPage` to reuse that
getter instead of reconstructing the `data-ouia-component-id` string directly.
Keep the existing click sequence, but resolve the item through
`getFilterDropdownItem(status)` so selector changes only need to be made in one
place.

In `@frontend/e2e/tests/helm/helm-release.spec.ts`:
- Around line 151-158: The helm release spec is duplicating raw action-menu
selectors instead of using the page object abstraction. Update the verification
in helm-release.spec.ts to use HelmPage for these menu items, and add a
getActionMenuItem(actionName) helper on HelmPage that mirrors
HelmDetailsPage.getActionMenuItem so the selector logic lives in one place. Keep
the existing clickKebabMenu and action-name usage, but replace inline
page.locator('[data-test-action="..."]') calls with the shared helper.
🪄 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: 545130e5-3425-4d94-baae-9f04c9054ca9

📥 Commits

Reviewing files that changed from the base of the PR and between db613d7 and c5c0825.

⛔ Files ignored due to path filters (1)
  • frontend/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (46)
  • frontend/e2e/pages/helm-details-page.ts
  • frontend/e2e/pages/helm-page.ts
  • frontend/e2e/tests/helm/helm-release.spec.ts
  • frontend/integration-tests/test-cypress.sh
  • frontend/package.json
  • frontend/packages/helm-plugin/integration-tests/.eslintrc
  • frontend/packages/helm-plugin/integration-tests/README.md
  • frontend/packages/helm-plugin/integration-tests/cypress.config.js
  • frontend/packages/helm-plugin/integration-tests/features/BestPractices.md
  • frontend/packages/helm-plugin/integration-tests/features/helm-release.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/actions-on-helm-release-after-upgrade.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/actions-on-helm-release.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/helm-compatibility.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/helm-feature-flag.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/helm-installation-view.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/helm-navigation.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/helm-page-tabs.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/install-helm-chart.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/install-url-chart.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/topology-helm-release.feature
  • frontend/packages/helm-plugin/integration-tests/package.json
  • frontend/packages/helm-plugin/integration-tests/reporter-config.json
  • frontend/packages/helm-plugin/integration-tests/support/commands/hooks.ts
  • frontend/packages/helm-plugin/integration-tests/support/commands/index.ts
  • frontend/packages/helm-plugin/integration-tests/support/constants/index.ts
  • frontend/packages/helm-plugin/integration-tests/support/constants/navigation.ts
  • frontend/packages/helm-plugin/integration-tests/support/constants/static-text/helm-text.ts
  • frontend/packages/helm-plugin/integration-tests/support/pages/helm/helm-details-page.ts
  • frontend/packages/helm-plugin/integration-tests/support/pages/helm/helm-page.ts
  • frontend/packages/helm-plugin/integration-tests/support/pages/helm/index.ts
  • frontend/packages/helm-plugin/integration-tests/support/pages/helm/rollBack-helm-release-page.ts
  • frontend/packages/helm-plugin/integration-tests/support/pages/helm/upgrade-helm-release-page.ts
  • frontend/packages/helm-plugin/integration-tests/support/pages/helm/url-chart-install-page.ts
  • frontend/packages/helm-plugin/integration-tests/support/pages/index.ts
  • frontend/packages/helm-plugin/integration-tests/support/step-definitions/common/common.ts
  • frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/actions-on-helm-release-after-upgrade.ts
  • frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-compatibility.ts
  • frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-installation-view.ts
  • frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-navigation.ts
  • frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-release.ts
  • frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm.ts
  • frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/install-url-chart.ts
  • frontend/packages/helm-plugin/integration-tests/test-data/namespaced-helm-chart-repository.yaml
  • frontend/packages/helm-plugin/integration-tests/test-data/namespaced-helm-crd.yaml
  • frontend/packages/helm-plugin/integration-tests/test-data/red-hat-helm-charts.yaml
  • frontend/packages/helm-plugin/integration-tests/tsconfig.json
💤 Files with no reviewable changes (43)
  • frontend/packages/helm-plugin/integration-tests/features/BestPractices.md
  • frontend/packages/helm-plugin/integration-tests/package.json
  • frontend/packages/helm-plugin/integration-tests/features/helm/actions-on-helm-release-after-upgrade.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/actions-on-helm-release.feature
  • frontend/packages/helm-plugin/integration-tests/support/pages/helm/rollBack-helm-release-page.ts
  • frontend/packages/helm-plugin/integration-tests/features/helm-release.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/topology-helm-release.feature
  • frontend/packages/helm-plugin/integration-tests/tsconfig.json
  • frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/install-url-chart.ts
  • frontend/packages/helm-plugin/integration-tests/features/helm/install-url-chart.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/helm-installation-view.feature
  • frontend/packages/helm-plugin/integration-tests/test-data/namespaced-helm-crd.yaml
  • frontend/packages/helm-plugin/integration-tests/support/constants/index.ts
  • frontend/packages/helm-plugin/integration-tests/test-data/namespaced-helm-chart-repository.yaml
  • frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/actions-on-helm-release-after-upgrade.ts
  • frontend/packages/helm-plugin/integration-tests/README.md
  • frontend/packages/helm-plugin/integration-tests/test-data/red-hat-helm-charts.yaml
  • frontend/packages/helm-plugin/integration-tests/support/commands/hooks.ts
  • frontend/packages/helm-plugin/integration-tests/.eslintrc
  • frontend/packages/helm-plugin/integration-tests/features/helm/helm-feature-flag.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/install-helm-chart.feature
  • frontend/packages/helm-plugin/integration-tests/support/pages/helm/helm-details-page.ts
  • frontend/packages/helm-plugin/integration-tests/support/pages/helm/url-chart-install-page.ts
  • frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-release.ts
  • frontend/packages/helm-plugin/integration-tests/support/commands/index.ts
  • frontend/packages/helm-plugin/integration-tests/support/constants/static-text/helm-text.ts
  • frontend/packages/helm-plugin/integration-tests/support/pages/helm/upgrade-helm-release-page.ts
  • frontend/packages/helm-plugin/integration-tests/support/constants/navigation.ts
  • frontend/packages/helm-plugin/integration-tests/features/helm/helm-navigation.feature
  • frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-installation-view.ts
  • frontend/packages/helm-plugin/integration-tests/features/helm/helm-compatibility.feature
  • frontend/packages/helm-plugin/integration-tests/support/step-definitions/common/common.ts
  • frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-compatibility.ts
  • frontend/packages/helm-plugin/integration-tests/support/pages/helm/helm-page.ts
  • frontend/packages/helm-plugin/integration-tests/features/helm/helm-page-tabs.feature
  • frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-navigation.ts
  • frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm.ts
  • frontend/packages/helm-plugin/integration-tests/cypress.config.js
  • frontend/packages/helm-plugin/integration-tests/support/pages/index.ts
  • frontend/packages/helm-plugin/integration-tests/reporter-config.json
  • frontend/package.json
  • frontend/integration-tests/test-cypress.sh
  • frontend/packages/helm-plugin/integration-tests/support/pages/helm/index.ts

Comment on lines +97 to +103
async upgradeChartVersion(): Promise<void> {
await this.chartVersionDropdown.click();
const items = this.page.getByTestId('console-select-item');
const count = await items.count();
if (count > 0) {
await items.first().click();
}

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Silent no-op when no alternate chart version is available.

If items.count() is 0, upgradeChartVersion does nothing and the caller proceeds to submit anyway, so the "upgrade" may complete without any version change, potentially passing the test without actually exercising the upgrade behavior.

🐛 Proposed fix
   async upgradeChartVersion(): Promise<void> {
     await this.chartVersionDropdown.click();
     const items = this.page.getByTestId('console-select-item');
     const count = await items.count();
-    if (count > 0) {
-      await items.first().click();
-    }
+    if (count === 0) {
+      throw new Error('No selectable chart versions available to upgrade to');
+    }
+    await items.first().click();
📝 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
async upgradeChartVersion(): Promise<void> {
await this.chartVersionDropdown.click();
const items = this.page.getByTestId('console-select-item');
const count = await items.count();
if (count > 0) {
await items.first().click();
}
async upgradeChartVersion(): Promise<void> {
await this.chartVersionDropdown.click();
const items = this.page.getByTestId('console-select-item');
const count = await items.count();
if (count === 0) {
throw new Error('No selectable chart versions available to upgrade to');
}
await items.first().click();
🤖 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/helm-page.ts` around lines 97 - 103, The
upgradeChartVersion method currently silently no-ops when no alternate chart
version is available, allowing the caller to continue as if an upgrade happened.
Update HelmPage.upgradeChartVersion to explicitly handle the zero-item case by
failing or otherwise surfacing that no upgrade target exists before returning,
and keep the existing click-on-first-option behavior only when
console-select-item has entries.

Comment on lines +107 to +121
await test.step('Verify details page tabs and actions (HR-05-TC13)', async () => {
await helmPage.navigateToHelmReleases(ns);
await helmPage.searchByName(releaseName);
await helmPage.clickReleaseName(releaseName);

await expect(helmDetailsPage.getSectionHeading()).toBeVisible({ timeout: 30_000 });
await expect(helmDetailsPage.getResourcesTab()).toBeVisible();
await expect(helmDetailsPage.getRevisionHistoryTab()).toBeVisible();
await expect(helmDetailsPage.getReleaseNotesTab()).toBeVisible();

await helmDetailsPage.clickActionsMenu();
await expect(helmDetailsPage.getActionMenuItem('Upgrade')).toBeVisible();
await expect(helmDetailsPage.getActionMenuItem('Delete Helm Release')).toBeVisible();
await page.keyboard.press('Escape');
});

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Rollback menu item not verified here.

HelmDetailsPage already exposes verifyActionsInMenu(), which checks all three actions (Upgrade, Rollback, Delete Helm Release). This step manually re-checks only Upgrade and Delete, silently dropping Rollback coverage compared to the existing helper.

🐛 Proposed fix
       await helmDetailsPage.clickActionsMenu();
       await expect(helmDetailsPage.getActionMenuItem('Upgrade')).toBeVisible();
+      await expect(helmDetailsPage.getActionMenuItem('Rollback')).toBeVisible();
       await expect(helmDetailsPage.getActionMenuItem('Delete Helm Release')).toBeVisible();
       await page.keyboard.press('Escape');
📝 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
await test.step('Verify details page tabs and actions (HR-05-TC13)', async () => {
await helmPage.navigateToHelmReleases(ns);
await helmPage.searchByName(releaseName);
await helmPage.clickReleaseName(releaseName);
await expect(helmDetailsPage.getSectionHeading()).toBeVisible({ timeout: 30_000 });
await expect(helmDetailsPage.getResourcesTab()).toBeVisible();
await expect(helmDetailsPage.getRevisionHistoryTab()).toBeVisible();
await expect(helmDetailsPage.getReleaseNotesTab()).toBeVisible();
await helmDetailsPage.clickActionsMenu();
await expect(helmDetailsPage.getActionMenuItem('Upgrade')).toBeVisible();
await expect(helmDetailsPage.getActionMenuItem('Delete Helm Release')).toBeVisible();
await page.keyboard.press('Escape');
});
await test.step('Verify details page tabs and actions (HR-05-TC13)', async () => {
await helmPage.navigateToHelmReleases(ns);
await helmPage.searchByName(releaseName);
await helmPage.clickReleaseName(releaseName);
await expect(helmDetailsPage.getSectionHeading()).toBeVisible({ timeout: 30_000 });
await expect(helmDetailsPage.getResourcesTab()).toBeVisible();
await expect(helmDetailsPage.getRevisionHistoryTab()).toBeVisible();
await expect(helmDetailsPage.getReleaseNotesTab()).toBeVisible();
await helmDetailsPage.clickActionsMenu();
await expect(helmDetailsPage.getActionMenuItem('Upgrade')).toBeVisible();
await expect(helmDetailsPage.getActionMenuItem('Rollback')).toBeVisible();
await expect(helmDetailsPage.getActionMenuItem('Delete Helm Release')).toBeVisible();
await page.keyboard.press('Escape');
});
🤖 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/helm/helm-release.spec.ts` around lines 107 - 121, The
details-page actions check is missing Rollback coverage because it manually
asserts only Upgrade and Delete. Update the helm release e2e step to use
HelmDetailsPage.verifyActionsInMenu() instead of individual menu-item checks, so
all three actions including Rollback are verified through the existing helper.

Comment on lines +160 to +166
await test.step('Upgrade helm release again (HR-08-TC02)', async () => {
await helmPage.clickKebabMenu();
await helmPage.selectAction('Upgrade');
await helmPage.upgradeChartVersion();
await helmPage.clickUpgradeButton();
await expect(page).toHaveURL(/\/helm\//, { timeout: 30_000 });
});

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

🧩 Analysis chain

🏁 Script executed:

sed -n '120,220p' frontend/e2e/tests/helm/helm-release.spec.ts

Repository: openshift/console

Length of output: 3388


🏁 Script executed:

rg -n "selectRevision|clickRollbackButton|getActionMenuItem|navigateToHelmReleases|searchByName|upgradeChartVersion" frontend/e2e/tests -g '*.ts'

Repository: openshift/console

Length of output: 2301


🏁 Script executed:

fd -a "helm*.ts" frontend/e2e/tests frontend/e2e/page-objects frontend/e2e

Repository: openshift/console

Length of output: 227


🏁 Script executed:

fd -a "helm*.ts" frontend

Repository: openshift/console

Length of output: 316


🏁 Script executed:

rg -n "selectRevision\(" frontend

Repository: openshift/console

Length of output: 321


🏁 Script executed:

sed -n '1,220p' frontend/e2e/pages/helm-page.ts

Repository: openshift/console

Length of output: 7365


🏁 Script executed:

rg -n "class HelmDetailsPage|getActionMenuItem|clickActionsMenu|getSectionHeading|clickRevisionHistoryTab|getStatusDetails" frontend/e2e/pages frontend/e2e/tests

Repository: openshift/console

Length of output: 1893


🏁 Script executed:

sed -n '1,180p' frontend/e2e/pages/helm-details-page.ts

Repository: openshift/console

Length of output: 3211


Wait for the second upgrade to settle before rollback

frontend/e2e/tests/helm/helm-release.spec.ts:160-166 only waits for the URL change. Add the same post-upgrade Deployed check used above before opening rollback so selectRevision() doesn’t read a stale revision list.

🐛 Proposed fix
      await helmPage.clickUpgradeButton();
      await expect(page).toHaveURL(/\/helm\//, { timeout: 30_000 });
+     await helmPage.navigateToHelmReleases(ns);
+     await helmPage.searchByName(releaseName);
+     await expect(helmPage.getStatusText().first()).toContainText('Deployed', { timeout: 60_000 });
     });
📝 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
await test.step('Upgrade helm release again (HR-08-TC02)', async () => {
await helmPage.clickKebabMenu();
await helmPage.selectAction('Upgrade');
await helmPage.upgradeChartVersion();
await helmPage.clickUpgradeButton();
await expect(page).toHaveURL(/\/helm\//, { timeout: 30_000 });
});
await test.step('Upgrade helm release again (HR-08-TC02)', async () => {
await helmPage.clickKebabMenu();
await helmPage.selectAction('Upgrade');
await helmPage.upgradeChartVersion();
await helmPage.clickUpgradeButton();
await expect(page).toHaveURL(/\/helm\//, { timeout: 30_000 });
await helmPage.navigateToHelmReleases(ns);
await helmPage.searchByName(releaseName);
await expect(helmPage.getStatusText().first()).toContainText('Deployed', { timeout: 60_000 });
});
🤖 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/helm/helm-release.spec.ts` around lines 160 - 166, The
second upgrade flow in helm-release.spec.ts only waits for the URL change, so
the revision list may still be stale when rollback is opened. In the upgrade
step around clickUpgradeButton() and the following expect(page).toHaveURL check,
add the same post-upgrade wait used earlier to confirm the release reaches
Deployed before proceeding. This should be done in the test step that performs
the second upgrade, so selectRevision() sees the refreshed revision list.

@openshift-ci

openshift-ci Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@vikram-raj: 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

rhamilto commented Jul 6, 2026

Copy link
Copy Markdown
Member

/label docs-approved
/label px-approved

@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 Jul 6, 2026
Comment on lines +7 to +20
'[data-test-section-heading="Helm Release details"]',
);
private readonly resourcesTab = this.page.locator(
'[data-test-id="horizontal-link-Resources"]',
);
private readonly revisionHistoryTab = this.page.locator(
'[data-test-id="horizontal-link-Revision history"]',
);
private readonly releaseNotesTab = this.page.locator(
'[data-test-id="horizontal-link-Release notes"]',
);
private readonly actionsMenuButton = this.page.locator(
'[data-test-id="actions-menu-button"]',
);

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.

Legacy data-test-id selectors used directly without adding data-test to React components

These locators all use data-test-id attribute selectors directly:

  • [data-test-id="horizontal-link-Resources"]
  • [data-test-id="horizontal-link-Revision history"]
  • [data-test-id="horizontal-link-Release notes"]
  • [data-test-id="actions-menu-button"]
  • [data-test-id="action-items"]
  • [data-test-id="modal-title"]

Same pattern in helm-page.ts: [data-test-id="submit-button"], [data-test-id="reset-button"], [data-test-id="kebab-button"].

The migration guidelines say: when a component only has data-test-id="x", add data-test="x" alongside it in the React source, then use getByTestId("x") in the page object. This PR has no React component changes, so all these selectors use the legacy attribute directly.

This matters because when legacy attributes are eventually removed, all these selectors will break silently. Adding data-test now is a small upfront cost that prevents that.

Comment on lines +73 to +79
for (const action of actions) {
const item = this.actionItems.locator('li', { hasText: action });
await item.scrollIntoViewIfNeeded();
}
}

getActionMenuItem(actionName: string): Locator {

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.

Dead code — verifyActionsInMenu() is never called and has no assertions

This method is defined but never used in the spec. It also only calls scrollIntoViewIfNeeded() without any expect() assertions, so even if it were called it wouldn't verify anything. Remove it.

Comment on lines +33 to +36
async searchByName(name: string): Promise<void> {
const filterToggle = this.dataViewFilters.locator('.pf-v6-c-menu-toggle').first();
await this.robustClick(filterToggle, { timeout: 60_000 });
await this.page.locator('.pf-v6-c-menu__list-item', { hasText: 'Name' }).click();

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.

Fragile PatternFly CSS class selectors

.pf-v6-c-menu-toggle and .pf-v6-c-menu__list-item are PatternFly internal class names that will break on major PF version upgrades. These selectors also appear at lines 41, 100, 118, and 133 (.pf-v6-c-button__progress).

Where possible, prefer getByRole() or add data-test attributes. For example, the filter toggle could use getByRole('button') scoped to the filters container, and the menu items could use getByRole('menuitem', { name: 'Name' }).

Comment on lines +57 to +63

await test.step('Cancel creation', async () => {
await helmPage.getCancelButton().click();
});
});

test('installs Helm Chart, verifies status and details, filters, and manages lifecycle', async ({

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.

Inline selectors belong in page objects

These raw selectors should be encapsulated in HelmPage or HelmDetailsPage:

  • Line 59: page.locator('[data-test="form-title"]')
  • Line 61: page.locator('#root_field-group')
  • Line 148: page.locator('[data-test-action="Upgrade"]') (and Rollback, Delete at 149-150)

The migration guidelines state: "locators in page objects, test scenarios in specs." These could be helmPage.getFormTitle(), helmPage.getFormSections(), etc.

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/helm Related to helm-plugin 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. 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