Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ declare global {
namespace Cypress {
interface Chainable {
alertTitleShouldContain(title: string): Chainable<Element>;
clickNavLink(path: string[]): Chainable<Element>;
selectByDropDownText(selector: string, dropdownText: string): Chainable<Element>;
selectByAutoCompleteDropDownText(selector: string, dropdownText: string): Chainable<Element>;
verifyDropdownselected(selector: string): Chainable<Element>;
Expand All @@ -31,15 +30,6 @@ Cypress.Commands.add('alertTitleShouldContain', (alertTitle: string) => {
cy.byLegacyTestID('modal-title').should('contain.text', alertTitle);
});

Cypress.Commands.add('clickNavLink', (path: string[]) => {
cy.get(`[data-test="nav"]`) // this assumes all top level menu items are expandable
.contains(path[0])
.click(); // open top, expandable menu
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500); // wait for animation
cy.get('#page-sidebar').contains(path[1]).click();
});

Cypress.Commands.add('selectByDropDownText', (selector: string, dropdownText: string) => {
cy.get(selector).click();
cy.get('li').contains(dropdownText).click({ force: true });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export const catalogPage = {
throw new Error('Card is not available in Catalog');
}
}
catalogPage.verifyPageTitle(type);
},
selectTemplateCategory: (templateCategoryTitle: string) => {
const selector =
Expand All @@ -100,6 +101,7 @@ export const catalogPage = {
selectHelmChartCard: (cardName: string) => cy.byTestID(`HelmChart-${cardName}`).first().click(),
clickOnInstallButton: () => {
cy.get(catalogPO.installHelmChart.create).click();
cy.get('.pf-v6-c-button__progress').should('not.exist');
cy.get('.co-m-loader', { timeout: 40000 }).should('not.exist');
},
enterReleaseName: (releaseName: string) =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Disabled due to createRoot concurrent rendering failures (OCPBUGS-82511)
@helm @smoke @manual
@helm @smoke
Feature: Helm Release
As a user, I want to perform actions on the helm release


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


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


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


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

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

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

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


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


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


Scenario: Perform the helm chart upgrade for already upgraded helm chart : HR-08-TC02
Given user is on the Helm page with helm release "nodejs-release"
When user clicks on the Kebab menu
Expand All @@ -103,7 +104,7 @@ Feature: Helm Release


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


Scenario: Delete Helm Release through Context Menu: HR-01-TC03
Given user is at the Topology page in admin view
Given user is at the Topology page
When user right clicks on the helm release "nodejs-release" to open the context menu
And user clicks on the "Delete Helm Release" action
And user enters the release name "nodejs-release"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
before(() => {
const bridgePasswordIDP: string = Cypress.expose('BRIDGE_HTPASSWD_IDP') || 'test';
const bridgePasswordUsername: string = Cypress.expose('BRIDGE_HTPASSWD_USERNAME') || 'test';
cy.env(['BRIDGE_HTPASSWD_PASSWORD']).then(({ BRIDGE_HTPASSWD_PASSWORD }) => {
cy.login(bridgePasswordIDP, bridgePasswordUsername, BRIDGE_HTPASSWD_PASSWORD || 'test');
});
cy.login();
cy.document().its('readyState').should('eq', 'complete');
cy.window().then((win: any) => {
win.SERVER_FLAGS.userSettingsLocation = 'localstorage';
Expand All @@ -12,11 +8,6 @@ before(() => {
cy.exec('oc apply -f test-data/red-hat-helm-charts.yaml');
});

beforeEach(() => {
cy.initAdmin();
cy.byLegacyTestID('topology-header').should('exist').click({ force: true });
});

after(() => {
cy.exec(`oc delete namespace ${Cypress.expose('NAMESPACE')}`, { failOnNonZeroExit: false });
});
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './navigation';
export * from './static-text/helm-text';
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* Navigation paths for cy.clickNavLink()
* Format: [parent menu, submenu]
*/
export const navPaths = {
helm: ['Ecosystem', 'Helm'],
topology: ['Workloads', 'Topology'],
softwareCatalog: ['Ecosystem', 'Software Catalog'],
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ export const upgradeHelmRelease = {
updateReplicaCount: (replicaCount: string = '2') =>
cy.get(helmPO.upgradeHelmRelease.replicaCount).clear().type(replicaCount),
upgradeChartVersion: () => {
// Wait for the dropdown to be enabled (starts disabled while loading chart versions)
cy.get(helmPO.upgradeHelmRelease.chartVersion).should('not.be.disabled');
cy.get(helmPO.upgradeHelmRelease.chartVersion).click();
const count = Cypress.$('[data-test="console-select"]').length;
const randNum = Math.floor(Math.random() * count);
Expand All @@ -14,5 +16,6 @@ export const upgradeHelmRelease = {
},
clickOnUpgrade: () => {
cy.get(helmPO.upgradeHelmRelease.upgrade).click();
cy.get('.pf-v6-c-button__progress').should('not.exist');
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ import {
gitPage,
catalogPage,
addPage,
app,
} from '@console/dev-console/integration-tests/support/pages';
import { checkDeveloperPerspective } from '@console/dev-console/integration-tests/support/pages/functions/checkDeveloperPerspective';
import { navPaths } from '../../constants';

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

Given('user is at the Topology page', () => {
navigateTo(devNavigationMenu.Topology);
topologyPage.verifyTopologyPage();
});

Given('user is at the Topology page in admin view', () => {
cy.byLegacyTestID('topology-header').should('exist').click({ force: true });
cy.clickNavLink(navPaths.topology);
app.waitForLoad();
topologyPage.verifyTopologyPage();
});

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

When('user navigates to Topology page', () => {
navigateTo(devNavigationMenu.Topology);
});

Then('modal with {string} appears', (header: string) => {
modal.modalTitleShouldContain(header);
});
Expand All @@ -94,11 +88,14 @@ When('user selects {string} card from add page', (cardName: string) => {
});

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

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

When('user switches to the {string} tab', (tab: string) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ When('user clicks on the Create button on side bar', () => {
});

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
} from '@console/dev-console/integration-tests/support/pages';
import { checkDeveloperPerspective } from '@console/dev-console/integration-tests/support/pages/functions/checkDeveloperPerspective';
import { topologyPage } from '@console/topology/integration-tests/support/pages/topology/topology-page';
import { navPaths } from '../../constants';
import { helmPage, helmDetailsPage } from '../../pages';

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

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

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

Given('user has installed helm chart', () => {
navigateTo(devNavigationMenu.Topology);
cy.clickNavLink(navPaths.topology);
topologyPage.verifyTopologyPage();
topologyPage.verifyWorkloadInTopologyPage('nodejs-release');
});

Given('user is at the Helm page', () => {
navigateTo(devNavigationMenu.Helm);
cy.clickNavLink(navPaths.helm);
});

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

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

When('user navigates to Helm page', () => {
navigateTo(devNavigationMenu.Helm);
cy.clickNavLink(navPaths.helm);
});

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

Given('user is able to see {string} in helm page', (helmRelease: string) => {
navigateTo(devNavigationMenu.Helm);
cy.clickNavLink(navPaths.helm);
helmPage.search(helmRelease);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { helmPO } from '@console/dev-console/integration-tests/support/pageObjec
import {
topologyPage,
topologySidePane,
app,
createHelmChartFromAddPage,
} from '@console/dev-console/integration-tests/support/pages';
import { navPaths } from '../../constants';
import { upgradeHelmRelease, helmDetailsPage, rollBackHelmRelease, helmPage } from '../../pages';

Given('helm release {string} is present in topology page', (workloadName: string) => {
Expand Down Expand Up @@ -74,8 +74,7 @@ Then(
);

Given('user is on the Helm page with helm release {string}', (helmRelease: string) => {
cy.get('[data-quickstart-id="qs-nav-ecosystem"]').should('be.visible').click({ force: true });
cy.get('[data-test-id="helm-nav"]').should('be.visible').click({ force: true });
cy.clickNavLink(navPaths.helm);
helmPage.search(helmRelease);
});

Expand All @@ -84,7 +83,7 @@ Given('user is able to see {string} in helm page in admin view', (helmRelease: s
});

When('user clicks on the Helm Release tab in admin perspective', () => {
cy.clickNavLink(['Ecosystem', 'Helm']);
cy.clickNavLink(navPaths.helm);
cy.byLegacyTestID('horizontal-link-Helm Releases').should('exist').click({ force: true });
});

Expand Down Expand Up @@ -136,11 +135,6 @@ When('user clicks on the Delete button', () => {
helmDetailsPage.uninstallHelmRelease();
});

Then('user will be redirected to Topology page', () => {
cy.reload();
app.waitForDocumentLoad();
topologyPage.verifyTopologyPage();
});
When('user clicks on the helm release {string}', (helmReleaseName: string) => {
topologyPage.clickOnGroup(helmReleaseName);
});
Expand All @@ -153,11 +147,6 @@ Then('user will see the Details, Resources, Release notes tabs', () => {
topologyPage.verifyHelmReleaseSidePaneTabs();
});

Given('user is on the topology sidebar of the helm release {string}', (helmReleaseName: string) => {
topologyPage.clickOnHelmGroup(helmReleaseName);
topologySidePane.verify();
});

Then('user will see the {string} action item', (actionItem: string) => {
cy.byTestActionID(actionItem).should('be.visible');
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps';
import { devNavigationMenu } from '@console/dev-console/integration-tests/support/constants';
import { navigateTo } from '@console/dev-console/integration-tests/support/pages';
import { topologyPage } from '@console/topology/integration-tests/support/pages/topology/topology-page';
import { navPaths } from '../../constants';
import { urlChartInstallPage } from '../../pages';

Given('user is at the URL chart install page', () => {
navigateTo(devNavigationMenu.Helm);
cy.clickNavLink(navPaths.helm);
cy.byLegacyTestID('item-create').click();
cy.get('[data-test-dropdown-menu]').contains('Helm Chart URL').click();
});
Expand Down Expand Up @@ -51,7 +49,3 @@ When('user clicks on the Install button', () => {
Then('user will see a validation error for invalid Chart URL format', () => {
cy.get('.pf-m-error').should('exist');
});

Then('user will be redirected to Topology page', () => {
topologyPage.verifyTopologyPage();
});
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ const commonConfig = {
).replace(/\/$/, '')}`,
testIsolation: false,
experimentalMemoryManagement: true,
numTestsKeptInMemory: 5,
numTestsKeptInMemory: 50,
injectDocumentDomain: true,
userAgent: 'ConsoleIntegrationTestEnvironment',
},
Expand Down
Loading