Skip to content

Commit 24666aa

Browse files
rhamiltoclaude
andcommitted
OCPBUGS-82511: re-enable helm-release.feature
Changes to fix flaky Helm release Cypress tests and re-enable the test suite: Navigation and test structure improvements: - Add navigation constants (navPaths) to DRY up cy.clickNavLink calls - Replace navigateTo() with cy.clickNavLink() for Helm and Topology navigation - Remove duplicate cy.clickNavLink() command definition in dev-console - Move cy.clickNavLink() to shared integration-tests package - Add app.waitForLoad() calls to ensure pages fully load before interactions - Update helm-release.feature precondition to use admin perspective setup Timing and race condition fixes: - Wait for chart version dropdowns to be enabled before clicking - Wait for button loading states to complete before proceeding - Wait for catalog cards to be filtered and displayed after type selection - Increase numTestsKeptInMemory from 5 to 50 to prevent memory cleanup mid-test - Add verifyPageTitle() check after selecting catalog type - Change detailsPage titleShouldContain to use 'exist' instead of 'be.visible' Topology sidebar improvements: - Fix topology sidebar flake by searching for helm group before clicking - Update verifyActions to check exact action list length and order - Fix malformed CSS selector in topology-po.ts (missing closing quote) Test cleanup: - Remove duplicate step definitions for "user will be redirected to Topology page" - Remove duplicate step definition for "user is on the topology sidebar" - Simplify hooks.ts to use cy.login() without explicit credentials - Remove beforeEach hook that was causing state pollution - Reorder test scenarios to match dependency flow Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 1427d26 commit 24666aa

18 files changed

Lines changed: 67 additions & 94 deletions

File tree

frontend/packages/dev-console/integration-tests/support/commands/app.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ declare global {
99
namespace Cypress {
1010
interface Chainable {
1111
alertTitleShouldContain(title: string): Chainable<Element>;
12-
clickNavLink(path: string[]): Chainable<Element>;
1312
selectByDropDownText(selector: string, dropdownText: string): Chainable<Element>;
1413
selectByAutoCompleteDropDownText(selector: string, dropdownText: string): Chainable<Element>;
1514
verifyDropdownselected(selector: string): Chainable<Element>;
@@ -31,15 +30,6 @@ Cypress.Commands.add('alertTitleShouldContain', (alertTitle: string) => {
3130
cy.byLegacyTestID('modal-title').should('contain.text', alertTitle);
3231
});
3332

34-
Cypress.Commands.add('clickNavLink', (path: string[]) => {
35-
cy.get(`[data-test="nav"]`) // this assumes all top level menu items are expandable
36-
.contains(path[0])
37-
.click(); // open top, expandable menu
38-
// eslint-disable-next-line cypress/no-unnecessary-waiting
39-
cy.wait(500); // wait for animation
40-
cy.get('#page-sidebar').contains(path[1]).click();
41-
});
42-
4333
Cypress.Commands.add('selectByDropDownText', (selector: string, dropdownText: string) => {
4434
cy.get(selector).click();
4535
cy.get('li').contains(dropdownText).click({ force: true });

frontend/packages/dev-console/integration-tests/support/pages/add-flow/catalog-page.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export const catalogPage = {
8282
throw new Error('Card is not available in Catalog');
8383
}
8484
}
85+
catalogPage.verifyPageTitle(type);
8586
},
8687
selectTemplateCategory: (templateCategoryTitle: string) => {
8788
const selector =
@@ -100,6 +101,7 @@ export const catalogPage = {
100101
selectHelmChartCard: (cardName: string) => cy.byTestID(`HelmChart-${cardName}`).first().click(),
101102
clickOnInstallButton: () => {
102103
cy.get(catalogPO.installHelmChart.create).click();
104+
cy.get(catalogPO.installHelmChart.create).find('.pf-v6-c-button__progress').should('not.exist');
103105
cy.get('.co-m-loader', { timeout: 40000 }).should('not.exist');
104106
},
105107
enterReleaseName: (releaseName: string) =>

frontend/packages/helm-plugin/integration-tests/features/helm-release.feature

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Disabled due to createRoot concurrent rendering failures (OCPBUGS-82511)
2-
@helm @smoke @manual
1+
@helm @smoke
32
Feature: Helm Release
43
As a user, I want to perform actions on the helm release
54

65

76
@pre-condition
87
Scenario: Create or Select the project namespace
9-
Given user has created or selected namespace "aut-ci-helm"
8+
Given user is at the Helm Release tab in admin perspective
9+
And user has created or selected namespace "aut-ci-helm"
1010

1111

1212
Scenario: Open the Helm tab on the navigation bar when helm charts are absent: HR-05-TC01
@@ -17,8 +17,7 @@ Feature: Helm Release
1717

1818

1919
Scenario: Create Helm Release page details: HR-05-TC02
20-
Given user has created or selected namespace "aut-ci-helm"
21-
And user is at Software Catalog page
20+
Given user is at Software Catalog page
2221
When user selects Helm Charts type from Software Catalog page
2322
And user searches and selects "Nodejs" card from catalog page
2423
And user clicks on the Create button on side bar
@@ -39,6 +38,7 @@ Feature: Helm Release
3938
Then user will be redirected to Topology page
4039
And Topology page have the helm chart workload "nodejs-release"
4140

41+
4242
Scenario: Helm release status verification: HR-01-TC04
4343
Given user is at the Helm Release tab in admin perspective
4444
And user is able to see "nodejs-release" in helm page in admin view
@@ -51,7 +51,7 @@ Feature: Helm Release
5151
And user is able to see the status and status icon of Revision history page
5252

5353
Scenario: Context menu options of helm release: HR-01-TC01
54-
Given user is at the Topology page in admin view
54+
Given user is at the Topology page
5555
When user right clicks on the helm release "nodejs-release" to open the context menu
5656
Then user is able to see the context menu with actions Upgrade and Delete Helm Release
5757

@@ -78,21 +78,22 @@ Feature: Helm Release
7878
And user will see the Release Notes tab
7979
And user will see the Actions drop down menu with options Upgrade, Rollback, and Delete Helm Release
8080

81-
Scenario: Actions menu on Helm page after helm chart upgrade: HR-08-TC01
82-
Given user is on the Helm page with helm release "nodejs-release"
83-
When user clicks on the Kebab menu
84-
Then user is able to see kebab menu with actions Upgrade, Rollback and Delete Helm Release
85-
8681

8782
Scenario: Perform Upgrade action on Helm Release through Context Menu: HR-08-TC04
88-
Given user is at the Topology page in admin view
83+
Given user is at the Topology page
8984
When user right clicks on the helm release "nodejs-release" to open the context menu
9085
And user clicks on the "Upgrade" action
9186
And user upgrades the chart Version
9287
And user clicks on the upgrade button
9388
Then user will be redirected to Topology page
9489

9590

91+
Scenario: Actions menu on Helm page after helm chart upgrade: HR-08-TC01
92+
Given user is on the Helm page with helm release "nodejs-release"
93+
When user clicks on the Kebab menu
94+
Then user is able to see kebab menu with actions Upgrade, Rollback and Delete Helm Release
95+
96+
9697
Scenario: Perform the helm chart upgrade for already upgraded helm chart : HR-08-TC02
9798
Given user is on the Helm page with helm release "nodejs-release"
9899
When user clicks on the Kebab menu
@@ -103,7 +104,7 @@ Feature: Helm Release
103104

104105

105106
Scenario: Perform Rollback action on Helm Release through Context Menu: HR-08-TC03
106-
Given user is at the Topology page in admin view
107+
Given user is at the Topology page
107108
And user is on the topology sidebar of the helm release "nodejs-release"
108109
When user clicks on the Actions drop down menu
109110
And user clicks on the "Rollback" action
@@ -113,7 +114,7 @@ Feature: Helm Release
113114

114115

115116
Scenario: Delete Helm Release through Context Menu: HR-01-TC03
116-
Given user is at the Topology page in admin view
117+
Given user is at the Topology page
117118
When user right clicks on the helm release "nodejs-release" to open the context menu
118119
And user clicks on the "Delete Helm Release" action
119120
And user enters the release name "nodejs-release"
Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
before(() => {
2-
const bridgePasswordIDP: string = Cypress.expose('BRIDGE_HTPASSWD_IDP') || 'test';
3-
const bridgePasswordUsername: string = Cypress.expose('BRIDGE_HTPASSWD_USERNAME') || 'test';
4-
cy.env(['BRIDGE_HTPASSWD_PASSWORD']).then(({ BRIDGE_HTPASSWD_PASSWORD }) => {
5-
cy.login(bridgePasswordIDP, bridgePasswordUsername, BRIDGE_HTPASSWD_PASSWORD || 'test');
6-
});
2+
cy.login();
73
cy.document().its('readyState').should('eq', 'complete');
84
cy.window().then((win: any) => {
95
win.SERVER_FLAGS.userSettingsLocation = 'localstorage';
@@ -12,11 +8,6 @@ before(() => {
128
cy.exec('oc apply -f test-data/red-hat-helm-charts.yaml');
139
});
1410

15-
beforeEach(() => {
16-
cy.initAdmin();
17-
cy.byLegacyTestID('topology-header').should('exist').click({ force: true });
18-
});
19-
2011
after(() => {
2112
cy.exec(`oc delete namespace ${Cypress.expose('NAMESPACE')}`, { failOnNonZeroExit: false });
2213
});
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
export * from './navigation';
12
export * from './static-text/helm-text';
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* Navigation paths for cy.clickNavLink()
3+
* Format: [parent menu, submenu]
4+
*/
5+
export const navPaths = {
6+
helm: ['Ecosystem', 'Helm'],
7+
topology: ['Workloads', 'Topology'],
8+
softwareCatalog: ['Ecosystem', 'Software Catalog'],
9+
};

frontend/packages/helm-plugin/integration-tests/support/pages/helm/upgrade-helm-release-page.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ export const upgradeHelmRelease = {
66
updateReplicaCount: (replicaCount: string = '2') =>
77
cy.get(helmPO.upgradeHelmRelease.replicaCount).clear().type(replicaCount),
88
upgradeChartVersion: () => {
9+
// Wait for the dropdown to be enabled (starts disabled while loading chart versions)
10+
cy.get(helmPO.upgradeHelmRelease.chartVersion).should('not.be.disabled');
911
cy.get(helmPO.upgradeHelmRelease.chartVersion).click();
1012
const count = Cypress.$('[data-test="console-select"]').length;
1113
const randNum = Math.floor(Math.random() * count);
@@ -14,5 +16,6 @@ export const upgradeHelmRelease = {
1416
},
1517
clickOnUpgrade: () => {
1618
cy.get(helmPO.upgradeHelmRelease.upgrade).click();
19+
cy.get(helmPO.upgradeHelmRelease.upgrade).find('.pf-v6-c-button__progress').should('not.exist');
1720
},
1821
};

frontend/packages/helm-plugin/integration-tests/support/step-definitions/common/common.ts

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ import {
1616
gitPage,
1717
catalogPage,
1818
addPage,
19+
app,
1920
} from '@console/dev-console/integration-tests/support/pages';
2021
import { checkDeveloperPerspective } from '@console/dev-console/integration-tests/support/pages/functions/checkDeveloperPerspective';
22+
import { navPaths } from '../../constants';
2123

2224
Given('user is at developer perspective', () => {
2325
checkDeveloperPerspective();
@@ -33,12 +35,8 @@ Given('user has created or selected namespace {string}', (projectName: string) =
3335
});
3436

3537
Given('user is at the Topology page', () => {
36-
navigateTo(devNavigationMenu.Topology);
37-
topologyPage.verifyTopologyPage();
38-
});
39-
40-
Given('user is at the Topology page in admin view', () => {
41-
cy.byLegacyTestID('topology-header').should('exist').click({ force: true });
38+
cy.clickNavLink(navPaths.topology);
39+
app.waitForLoad();
4240
topologyPage.verifyTopologyPage();
4341
});
4442

@@ -77,10 +75,6 @@ When('user clicks node {string} to open the side bar', (name: string) => {
7775
topologyPage.componentNode(name).click({ force: true });
7876
});
7977

80-
When('user navigates to Topology page', () => {
81-
navigateTo(devNavigationMenu.Topology);
82-
});
83-
8478
Then('modal with {string} appears', (header: string) => {
8579
modal.modalTitleShouldContain(header);
8680
});
@@ -94,11 +88,14 @@ When('user selects {string} card from add page', (cardName: string) => {
9488
});
9589

9690
Given('user is at Software Catalog page', () => {
97-
cy.byLegacyTestID('developer-catalog-header').should('exist').click({ force: true });
91+
cy.clickNavLink(navPaths.softwareCatalog);
92+
catalogPage.verifyTitle();
9893
});
9994

10095
When('user selects Helm Charts type from Software Catalog page', () => {
10196
catalogPage.selectCatalogType(catalogTypes.HelmCharts);
97+
// Wait for catalog cards to be filtered and displayed
98+
catalogPage.isCardsDisplayed();
10299
});
103100

104101
When('user switches to the {string} tab', (tab: string) => {

frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-installation-view.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ When('user clicks on the Create button on side bar', () => {
1717
});
1818

1919
When('user clicks on the chart versions dropdown menu', () => {
20+
// Wait for the dropdown to be enabled (starts disabled while loading chart versions)
21+
cy.get(helmPO.upgradeHelmRelease.chartVersion).should('not.be.disabled');
2022
cy.get(helmPO.upgradeHelmRelease.chartVersion).click();
2123
});
2224

frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-navigation.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
} from '@console/dev-console/integration-tests/support/pages';
2020
import { checkDeveloperPerspective } from '@console/dev-console/integration-tests/support/pages/functions/checkDeveloperPerspective';
2121
import { topologyPage } from '@console/topology/integration-tests/support/pages/topology/topology-page';
22+
import { navPaths } from '../../constants';
2223
import { helmPage, helmDetailsPage } from '../../pages';
2324

2425
const deleteChartRepositoryFromDetailsPage = (name: string, type: string) => {
@@ -35,7 +36,7 @@ Given('user is at developer perspective', () => {
3536

3637
When('user clicks on the Helm tab in dev perspective', () => {
3738
cy.get('[data-quickstart-id="qs-admin-nav-helm"]').should('be.visible').click({ force: true });
38-
navigateTo(devNavigationMenu.Helm);
39+
cy.clickNavLink(navPaths.helm);
3940
});
4041

4142
Then('user will be redirected to Helm releases page', () => {
@@ -89,16 +90,17 @@ Then('Topology page have the helm chart workload {string}', (nodeName: string) =
8990
});
9091

9192
Given('user has installed helm chart', () => {
92-
navigateTo(devNavigationMenu.Topology);
93+
cy.clickNavLink(navPaths.topology);
94+
topologyPage.verifyTopologyPage();
9395
topologyPage.verifyWorkloadInTopologyPage('nodejs-release');
9496
});
9597

9698
Given('user is at the Helm page', () => {
97-
navigateTo(devNavigationMenu.Helm);
99+
cy.clickNavLink(navPaths.helm);
98100
});
99101

100102
Given('user is at the Helm Release tab in admin perspective', () => {
101-
cy.clickNavLink(['Ecosystem', 'Helm']);
103+
cy.clickNavLink(navPaths.helm);
102104
cy.byLegacyTestID('horizontal-link-Helm Releases').should('exist').click({ force: true });
103105
});
104106

@@ -315,7 +317,7 @@ When('user selects cluster-scoped scope type', () => {
315317
});
316318

317319
When('user navigates to Helm page', () => {
318-
navigateTo(devNavigationMenu.Helm);
320+
cy.clickNavLink(navPaths.helm);
319321
});
320322

321323
When('user can see {string} {string} details page', (type: string, name: string) => {
@@ -331,7 +333,7 @@ Given(
331333
);
332334

333335
Given('user is able to see {string} in helm page', (helmRelease: string) => {
334-
navigateTo(devNavigationMenu.Helm);
336+
cy.clickNavLink(navPaths.helm);
335337
helmPage.search(helmRelease);
336338
});
337339

0 commit comments

Comments
 (0)