diff --git a/frontend/integration-tests/test-cypress.sh b/frontend/integration-tests/test-cypress.sh index d24611a27d2..b149f502fd5 100755 --- a/frontend/integration-tests/test-cypress.sh +++ b/frontend/integration-tests/test-cypress.sh @@ -87,11 +87,12 @@ if [ -n "${nightly-}" ] && [ -z "${pkg-}" ]; then fi if [ -n "${headless-}" ] && [ -z "${pkg-}" ]; then + # DO NOT MERGE. UPDATED FOR TESTING IN CI. + yarn run test-cypress-helm-headless yarn run test-cypress-console-headless yarn run test-cypress-dev-console-headless yarn run test-cypress-olm-headless yarn run test-cypress-webterminal-headless - yarn run test-cypress-helm-headless yarn run test-cypress-knative-headless yarn run test-cypress-topology-headless # yarn run test-cypress-shipwright-headless diff --git a/frontend/packages/dev-console/integration-tests/support/commands/app.ts b/frontend/packages/dev-console/integration-tests/support/commands/app.ts index acb70315449..d9ce28dc94c 100644 --- a/frontend/packages/dev-console/integration-tests/support/commands/app.ts +++ b/frontend/packages/dev-console/integration-tests/support/commands/app.ts @@ -9,7 +9,6 @@ declare global { namespace Cypress { interface Chainable { alertTitleShouldContain(title: string): Chainable; - clickNavLink(path: string[]): Chainable; selectByDropDownText(selector: string, dropdownText: string): Chainable; selectByAutoCompleteDropDownText(selector: string, dropdownText: string): Chainable; verifyDropdownselected(selector: string): Chainable; @@ -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 }); diff --git a/frontend/packages/dev-console/integration-tests/support/pages/add-flow/catalog-page.ts b/frontend/packages/dev-console/integration-tests/support/pages/add-flow/catalog-page.ts index c66441d2b9a..87db1827f43 100644 --- a/frontend/packages/dev-console/integration-tests/support/pages/add-flow/catalog-page.ts +++ b/frontend/packages/dev-console/integration-tests/support/pages/add-flow/catalog-page.ts @@ -82,6 +82,7 @@ export const catalogPage = { throw new Error('Card is not available in Catalog'); } } + catalogPage.verifyPageTitle(type); }, selectTemplateCategory: (templateCategoryTitle: string) => { const selector = @@ -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) => diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm-release.feature b/frontend/packages/helm-plugin/integration-tests/features/helm-release.feature index 5c3485ba8f6..e0e88b8d6ce 100644 --- a/frontend/packages/helm-plugin/integration-tests/features/helm-release.feature +++ b/frontend/packages/helm-plugin/integration-tests/features/helm-release.feature @@ -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 @@ -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 @@ -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 @@ -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 @@ -78,14 +78,9 @@ 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 @@ -93,6 +88,12 @@ Feature: Helm Release 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 @@ -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 @@ -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" diff --git a/frontend/packages/helm-plugin/integration-tests/support/commands/hooks.ts b/frontend/packages/helm-plugin/integration-tests/support/commands/hooks.ts index 047464cf129..057173e500d 100644 --- a/frontend/packages/helm-plugin/integration-tests/support/commands/hooks.ts +++ b/frontend/packages/helm-plugin/integration-tests/support/commands/hooks.ts @@ -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'; @@ -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 }); }); diff --git a/frontend/packages/helm-plugin/integration-tests/support/constants/index.ts b/frontend/packages/helm-plugin/integration-tests/support/constants/index.ts index ff50b2449bf..bc225a6556b 100644 --- a/frontend/packages/helm-plugin/integration-tests/support/constants/index.ts +++ b/frontend/packages/helm-plugin/integration-tests/support/constants/index.ts @@ -1 +1,2 @@ +export * from './navigation'; export * from './static-text/helm-text'; diff --git a/frontend/packages/helm-plugin/integration-tests/support/constants/navigation.ts b/frontend/packages/helm-plugin/integration-tests/support/constants/navigation.ts new file mode 100644 index 00000000000..42af94c3faa --- /dev/null +++ b/frontend/packages/helm-plugin/integration-tests/support/constants/navigation.ts @@ -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'], +}; diff --git a/frontend/packages/helm-plugin/integration-tests/support/pages/helm/upgrade-helm-release-page.ts b/frontend/packages/helm-plugin/integration-tests/support/pages/helm/upgrade-helm-release-page.ts index aaf41353fb6..161c89791b5 100644 --- a/frontend/packages/helm-plugin/integration-tests/support/pages/helm/upgrade-helm-release-page.ts +++ b/frontend/packages/helm-plugin/integration-tests/support/pages/helm/upgrade-helm-release-page.ts @@ -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); @@ -14,5 +16,6 @@ export const upgradeHelmRelease = { }, clickOnUpgrade: () => { cy.get(helmPO.upgradeHelmRelease.upgrade).click(); + cy.get('.pf-v6-c-button__progress').should('not.exist'); }, }; diff --git a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/common/common.ts b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/common/common.ts index c2f0bdfdb45..cc33120124d 100644 --- a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/common/common.ts +++ b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/common/common.ts @@ -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(); @@ -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(); }); @@ -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); }); @@ -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) => { diff --git a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-installation-view.ts b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-installation-view.ts index dd493b685dd..4b4460cd206 100644 --- a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-installation-view.ts +++ b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-installation-view.ts @@ -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(); }); diff --git a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-navigation.ts b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-navigation.ts index 058a7939c65..591ea417b7b 100644 --- a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-navigation.ts +++ b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-navigation.ts @@ -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) => { @@ -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', () => { @@ -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 }); }); @@ -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) => { @@ -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); }); diff --git a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-release.ts b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-release.ts index 7faf20b1d7e..b191e750f06 100644 --- a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-release.ts +++ b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-release.ts @@ -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) => { @@ -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); }); @@ -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 }); }); @@ -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); }); @@ -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'); }); diff --git a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/install-url-chart.ts b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/install-url-chart.ts index c4726a161e4..7db027e83f7 100644 --- a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/install-url-chart.ts +++ b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/install-url-chart.ts @@ -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(); }); @@ -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(); -}); diff --git a/frontend/packages/helm-plugin/src/components/details-page/HelmReleaseDetailsPage.tsx b/frontend/packages/helm-plugin/src/components/details-page/HelmReleaseDetailsPage.tsx index c74aa148e80..41deb482fd0 100644 --- a/frontend/packages/helm-plugin/src/components/details-page/HelmReleaseDetailsPage.tsx +++ b/frontend/packages/helm-plugin/src/components/details-page/HelmReleaseDetailsPage.tsx @@ -13,9 +13,9 @@ const HelmReleaseDetailsPage: FC = () => { const handleNamespaceChange = useCallback( (newNamespace: string): void => { if (newNamespace === ALL_NAMESPACES_KEY) { - navigate('/helm-releases/all-namespaces'); + navigate('/helm/all-namespaces'); } else { - navigate(`/helm-releases/ns/${newNamespace}`); + navigate(`/helm/ns/${newNamespace}`); } }, [navigate], diff --git a/frontend/packages/helm-plugin/src/utils/helm-utils.ts b/frontend/packages/helm-plugin/src/utils/helm-utils.ts index 2675dcabf65..34814f31c00 100644 --- a/frontend/packages/helm-plugin/src/utils/helm-utils.ts +++ b/frontend/packages/helm-plugin/src/utils/helm-utils.ts @@ -222,11 +222,11 @@ export const getOriginRedirectURL = ( case HelmActionOrigins.topology: return `/topology/ns/${namespace}`; case HelmActionOrigins.list: - return `/helm-releases/ns/${namespace}`; + return `/helm/ns/${namespace}`; case HelmActionOrigins.details: return `/helm-releases/ns/${namespace}/release/${releaseName}`; default: - return `/helm-releases/ns/${namespace}`; + return `/helm/ns/${namespace}`; } }; diff --git a/frontend/packages/integration-tests/cypress-common-config.js b/frontend/packages/integration-tests/cypress-common-config.js index 6896c7526ef..d1b6de9076e 100644 --- a/frontend/packages/integration-tests/cypress-common-config.js +++ b/frontend/packages/integration-tests/cypress-common-config.js @@ -169,7 +169,7 @@ const commonConfig = { ).replace(/\/$/, '')}`, testIsolation: false, experimentalMemoryManagement: true, - numTestsKeptInMemory: 5, + numTestsKeptInMemory: 50, injectDocumentDomain: true, userAgent: 'ConsoleIntegrationTestEnvironment', }, diff --git a/frontend/packages/integration-tests/support/index.ts b/frontend/packages/integration-tests/support/index.ts index 929599ae278..a0fa9eaba2d 100644 --- a/frontend/packages/integration-tests/support/index.ts +++ b/frontend/packages/integration-tests/support/index.ts @@ -50,19 +50,6 @@ Cypress.Commands.add('visitAndWait', (url, options, selector = '#content') => { waitForElementToExist(selector); }); -Cypress.Commands.add('clickNavLink', (path: string[]) => { - cy.get('#page-sidebar') - .contains(path[0]) - .then(($navItem) => { - if ($navItem.attr('aria-expanded') !== 'true') { - cy.wrap($navItem).click(); - } - }); - if (path.length === 2) { - cy.get('#page-sidebar').contains(path[1]).click(); - } -}); - before(() => { cy.task('readFileIfExists', 'cypress-a11y-report.json').then((a11yReportOrNull: string) => { if (a11yReportOrNull !== null) { diff --git a/frontend/packages/integration-tests/views/details-page.ts b/frontend/packages/integration-tests/views/details-page.ts index 812ed0904d7..2f9f6da209d 100644 --- a/frontend/packages/integration-tests/views/details-page.ts +++ b/frontend/packages/integration-tests/views/details-page.ts @@ -1,6 +1,6 @@ export const detailsPage = { titleShouldContain: (title: string) => { - cy.get('[data-test="page-heading"]', { timeout: 30000 }).should('be.visible'); + cy.get('[data-test="page-heading"]', { timeout: 30000 }).should('exist'); return cy.get('[data-test="page-heading"]').contains(title, { timeout: 30000 }); }, sectionHeaderShouldExist: (sectionHeading: string) => diff --git a/frontend/packages/topology/integration-tests/support/page-objects/topology-po.ts b/frontend/packages/topology/integration-tests/support/page-objects/topology-po.ts index 17d9094351f..25a72a27d73 100644 --- a/frontend/packages/topology/integration-tests/support/page-objects/topology-po.ts +++ b/frontend/packages/topology/integration-tests/support/page-objects/topology-po.ts @@ -80,7 +80,7 @@ export const topologyPO = { knativeServiceIcon: '[title="Service"]', tabs: '[data-test="topology-sidepane"] button[role="tab"]', sectionTitle: 'h2', - close: '[data-test="sidebar-close-button]', + close: '[data-test="sidebar-close-button"]', labelsList: '[data-test="label-list"]', editAnnotations: '[data-test="edit-annotations"]', tabName: '[data-test="topology-sidepane"] button[role="tab"]', diff --git a/frontend/packages/topology/integration-tests/support/pages/topology/topology-page.ts b/frontend/packages/topology/integration-tests/support/pages/topology/topology-page.ts index 3d5991de4a1..5b4cdb4b074 100644 --- a/frontend/packages/topology/integration-tests/support/pages/topology/topology-page.ts +++ b/frontend/packages/topology/integration-tests/support/pages/topology/topology-page.ts @@ -336,10 +336,14 @@ export const topologyPage = { .click({ force: true }); }, clickOnHelmGroup: (groupName: string) => { - return cy - .get(topologyPO.graph.helmGroupLabelText) - .should('be.visible') + // Search for the helm group to ensure it's loaded and highlighted + topologyHelper.search(groupName); + // Wait for the search to highlight the group + cy.get('[data-type="helm-release"] .is-filtered', { timeout: 10000 }).should('exist'); + // Now click on the helm group label + cy.get(topologyPO.graph.helmGroupLabelText) .contains(groupName) + .should('be.visible') .click({ force: true }); }, clickOnDeploymentNode: (nodeName: string) => { diff --git a/frontend/packages/topology/integration-tests/support/pages/topology/topology-side-pane-page.ts b/frontend/packages/topology/integration-tests/support/pages/topology/topology-side-pane-page.ts index f01f895aca7..0a0671c70b3 100644 --- a/frontend/packages/topology/integration-tests/support/pages/topology/topology-side-pane-page.ts +++ b/frontend/packages/topology/integration-tests/support/pages/topology/topology-side-pane-page.ts @@ -31,8 +31,9 @@ export const topologySidePane = { verifyActions: (...actions: string[]) => { cy.byLegacyTestID('action-items') .find('li') - .each(($el) => { - expect(actions).toContain($el.text()); + .should('have.length', actions.length) + .each(($el, index) => { + expect($el.text()).to.equal(actions[index]); }); }, close: () => cy.get(topologyPO.sidePane.close).scrollIntoView().click(),