diff --git a/frontend/packages/dev-console/integration-tests/support/pages/add-flow/dev-file-page.ts b/frontend/packages/dev-console/integration-tests/support/pages/add-flow/dev-file-page.ts index c3a5b4ca7432..7063e15602e3 100644 --- a/frontend/packages/dev-console/integration-tests/support/pages/add-flow/dev-file-page.ts +++ b/frontend/packages/dev-console/integration-tests/support/pages/add-flow/dev-file-page.ts @@ -50,5 +50,6 @@ export const devFilePage = { cy.log(`Issue with git url ${gitUrl}, maybe a private repo url. Please check it`); } }); + cy.get(gitPO.gitSection.validatedMessage).should('have.text', 'Validated'); }, }; diff --git a/frontend/packages/dev-console/integration-tests/support/pages/app.ts b/frontend/packages/dev-console/integration-tests/support/pages/app.ts index e9eedd24a6a3..0845a66f289a 100644 --- a/frontend/packages/dev-console/integration-tests/support/pages/app.ts +++ b/frontend/packages/dev-console/integration-tests/support/pages/app.ts @@ -215,7 +215,7 @@ export const navigateTo = (opt: devNavigationMenu) => { case devNavigationMenu.Consoles: { cy.get('body').then(($body) => { if ($body.text().includes('Consoles')) { - cy.byLegacyTestID('dev-perspective-nav').contains('Consoles').click(); + cy.byTestID('draggable-pinned-resource-item').contains('Consoles').click(); cy.byTestID('cluster').should('be.visible').click(); } else { cy.get(devNavigationMenuPO.search).click(); @@ -289,6 +289,14 @@ export const projectNameSpace = { }); // Bug: ODC-6164 - is created related to Accessibility violation - Until bug fix, below line is commented to execute the scripts in CI // cy.testA11y('Create Project modal'); + cy.url().then(($url) => { + if ($url.includes('topology/all-namespaces')) { + cy.get('.odc-namespaced-page__content').should('be.visible'); + } + else if ($url.includes('topology/ns')) { + cy.byLegacyTestID('item-filter').should('be.visible'); + } + }); cy.byTestID('dropdown-text-filter').type(projectName); cy.get('[data-test-id="namespace-bar-dropdown"] span.pf-v5-c-menu-toggle__text') .first() diff --git a/frontend/packages/topology/integration-tests/features/e2e/topology-ci.feature b/frontend/packages/topology/integration-tests/features/e2e/topology-ci.feature index 32f26e61c1c1..63d763c8ed91 100644 --- a/frontend/packages/topology/integration-tests/features/e2e/topology-ci.feature +++ b/frontend/packages/topology/integration-tests/features/e2e/topology-ci.feature @@ -1,4 +1,4 @@ -@topology @smoke +@manual @topology @smoke Feature: Perform actions on topology User will be able to create workloads and perform actions on topology page diff --git a/frontend/packages/topology/integration-tests/features/topology/resource-quota-warning.feature b/frontend/packages/topology/integration-tests/features/topology/resource-quota-warning.feature index 347b23bc17b6..afd175f04b8d 100644 --- a/frontend/packages/topology/integration-tests/features/topology/resource-quota-warning.feature +++ b/frontend/packages/topology/integration-tests/features/topology/resource-quota-warning.feature @@ -1,6 +1,6 @@ @topology @ODC6771 Feature: Update user in topology page if Quotas has been reached in a namespace - If any resource reached resource quota limit, a warning alert will be displayed for the user in Topology page. + If any resource reached resource quota limit, a warning alert will be displayed for the user in Topology page. Background: Given user is at developer perspective @@ -14,8 +14,8 @@ Feature: Update user in topology page if Quotas has been reached in a namespace And user navigates to Topology page And user clicks on link to view resource quota details Then user is redirected to resource quota details page - - + + @regression Scenario: multiple resources reached quota: T-19-TC02 Given user has created workload with resource type deployment @@ -23,7 +23,7 @@ Feature: Update user in topology page if Quotas has been reached in a namespace When user navigates to Topology page And user clicks on link to view resource quota details Then user is redirected to resource quota list page - + @regression Scenario: deployment node has yellow border around it and side-panel shows alert when resource quota is reached: T-19-TC03 @@ -33,7 +33,8 @@ Feature: Update user in topology page if Quotas has been reached in a namespace When user clicks on workload 'ex-node-js1' And user can see sidebar opens with Resources tab selected by default Then user is able to see resource quota alert - And user is able to see yellow border around 'ex-node-js1' workload + And user is able to see yellow border around 'ex-node-js1' workload + @regression Scenario: checking background color of deployment node for resource quota alert: T-19-TC04 @@ -41,9 +42,9 @@ Feature: Update user in topology page if Quotas has been reached in a namespace When user continously clicks on zoom-out button until it gets maximum zoomed out Then user is able to see yellow background on workload for resource quota alert - + @regression Scenario: deployment node shows alert when resource quota is reached in list view: T-19-TC05 Given user is at the Topology page When user clicks on List view button - Then user will see resource quota alert in 'ex-node-js1' list node \ No newline at end of file + Then user will see resource quota alert in 'ex-node-js1' list node \ No newline at end of file diff --git a/frontend/packages/topology/integration-tests/features/topology/topology-chart-area-visual.feature b/frontend/packages/topology/integration-tests/features/topology/topology-chart-area-visual.feature index 6e20db0bd529..1def009cf516 100644 --- a/frontend/packages/topology/integration-tests/features/topology/topology-chart-area-visual.feature +++ b/frontend/packages/topology/integration-tests/features/topology/topology-chart-area-visual.feature @@ -174,7 +174,7 @@ Feature: Topology chart area Then user is able to see options like Samples, Import from Git, Container Image, From Dockerfile, From Devfile, From Catalog, Database, Operator Backed, Helm Charts, Event Source, Channel - @regression + @regression Scenario: Add to Project in topology: T-06-TC17 Given user is at the Topology page When user right clicks on the empty chart area @@ -194,8 +194,8 @@ Feature: Topology chart area And user clicks on Create button # Crunchy Postgres for Kubernetes operator not installing correctly, won't able to create a postgres. And user hovers on Add to Project and clicks on "Operator Backed" - And user selects Redis and clicks on Create - And user fills the "Operator Backed" form with yaml at "test-data/redis-standalone.yaml" and clicks Create + And user selects "Postgres Cluster" and clicks on Create + And user fills the "Operator Backed" form with yaml at "test-data/hippo-postgres-cluster.yaml" and clicks Create And user hovers on Add to Project and clicks on "Helm Charts" And user selects Nodejs and clicks on Install Helm Charts And user fills the "Helm Chart" form and clicks Create @@ -425,7 +425,9 @@ Feature: Topology chart area And user can see "Error" in Status section on service binding connnector topology sidebar - @regression @odc-4944 + @regression @odc-4944 @broken-test + # Redis operator having issues after 0.14 updates, it does not appears in topology + # https://github.com/OT-CONTAINER-KIT/redis-operator/issues/526 Scenario: Connected status on Service binding details page: T-06-TC35 Given user has created namespace "aut-connected-sb" And user has installed Service Binding operator @@ -440,7 +442,9 @@ Feature: Topology chart area Then user will see "Connected" Status on Service binding details page - @regression @odc-4944 + @regression @odc-4944 @broken-test + # Redis operator having issues after 0.14 updates, it does not appears in topology + # https://github.com/OT-CONTAINER-KIT/redis-operator/issues/526 Scenario: Error status on Service binding details page: T-06-TC36 Given user has created namespace "aut-error-sb" And user has installed Service Binding operator @@ -455,7 +459,9 @@ Feature: Topology chart area Then user will see "Error" Status on Service binding details page - @regression @odc-7120 + @regression @odc-7120 @broken-test + # Redis operator having issues after 0.14 updates, it does not appears in topology + # https://github.com/OT-CONTAINER-KIT/redis-operator/issues/526 Scenario: Create connection using import YAML with Service Binding using Label Selector: T-06-TC37 Given user has created namespace "aut-connected-sb-ls" And user has installed Service Binding operator @@ -472,7 +478,9 @@ Feature: Topology chart area Then user will see service binding connection - @regression @odc-7120 + @regression @odc-7120 @broken-test + # Redis operator having issues after 0.14 updates, it does not appears in topology + # https://github.com/OT-CONTAINER-KIT/redis-operator/issues/526 Scenario: Label specified in Label Selector section on Service binding details page: T-06-TC38 Given user has created namespace "aut-label-details-sb" And user has installed Service Binding operator @@ -488,7 +496,9 @@ Feature: Topology chart area Then user will see "app=node-ej" in Label Selector section on Service binding details page - @regression @odc-7120 + @regression @odc-7120 @broken-test + # Redis operator having issues after 0.14 updates, it does not appears in topology + # https://github.com/OT-CONTAINER-KIT/redis-operator/issues/526 Scenario: Label specified in Label Selector section on Service binding side panel: T-06-TC39 Given user has created namespace "aut-label-panel-sb" And user has installed Service Binding operator diff --git a/frontend/packages/topology/integration-tests/features/topology/topology-editing-app-node.feature b/frontend/packages/topology/integration-tests/features/topology/topology-editing-app-node.feature index ce72aa2f56c4..03e892efe197 100644 --- a/frontend/packages/topology/integration-tests/features/topology/topology-editing-app-node.feature +++ b/frontend/packages/topology/integration-tests/features/topology/topology-editing-app-node.feature @@ -61,7 +61,7 @@ Feature: Editing an application Then user will be redirected to Topology with the updated resource limits - @smoke @broken-test + @smoke Scenario: Editing deployment using form view: T-09-TC05 Given user has created workload "rolling-update" with resource type "Deployment" When user right clicks on the workload "rolling-update" to open the Context Menu diff --git a/frontend/packages/topology/integration-tests/features/topology/topology-workload-sidebar.feature b/frontend/packages/topology/integration-tests/features/topology/topology-workload-sidebar.feature index 6028b316dc23..d3b26f7540c3 100644 --- a/frontend/packages/topology/integration-tests/features/topology/topology-workload-sidebar.feature +++ b/frontend/packages/topology/integration-tests/features/topology/topology-workload-sidebar.feature @@ -16,6 +16,7 @@ Feature: Sidebar in topology And user can see sidebar Details, Resources and Observe tabs And user verifies name of the node "nodejs-ex-git" and Action drop down present on top of the sidebar And user is able to see health check notification + And user can see show waiting pods with errors And user can see traffic details for pod And user can see close button diff --git a/frontend/packages/topology/integration-tests/support/page-objects/chart-area-po.ts b/frontend/packages/topology/integration-tests/support/page-objects/chart-area-po.ts index 3c2a534ebafc..b6b9df393990 100644 --- a/frontend/packages/topology/integration-tests/support/page-objects/chart-area-po.ts +++ b/frontend/packages/topology/integration-tests/support/page-objects/chart-area-po.ts @@ -22,7 +22,7 @@ export const chartAreaPO = { eventsource: '[data-test-action="Event Source"]', channel: '[data-test-action="Channel"]', filterItem: 'input[placeholder="Filter by keyword..."]', - sampleGo: '[data-test="Sample-Go"]', + sampleBuilderGo: '[data-test="BuilderImage-Go"]', submitButton: '[data-test-id="submit-button"]', deployImage: '[data-test-id="deploy-image-search-term"]', validationText: '#form-input-searchTerm-field-helper', 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 c64dfbbacc60..412ec7b9efba 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 @@ -289,7 +289,7 @@ export const topologyPO = { resourseTitle: '[data-test-id="resource-title"]', appformName: '[data-test-id="application-form-app-name"]', djangoPostgreSQL: '[data-test="item-name-Django + PostgreSQL-Templates"]', - NETSample: '[data-test="item-name-.NET-Samples"]', + NETSample: '[data-test="item-name-.NET-Builder Images"]', monitorApp: '[data-test="item-name-Monitor your sample application-Quick Starts"]', nodejsDevfiles: '[data-test="item-name-Basic Node.js-Devfiles"]', nodejsSamples: '[data-test="item-name-Basic Node.js-Samples"]', diff --git a/frontend/packages/topology/integration-tests/support/pages/functions/chart-functions.ts b/frontend/packages/topology/integration-tests/support/pages/functions/chart-functions.ts index 9f754790c718..cd248a3b1212 100644 --- a/frontend/packages/topology/integration-tests/support/pages/functions/chart-functions.ts +++ b/frontend/packages/topology/integration-tests/support/pages/functions/chart-functions.ts @@ -60,7 +60,7 @@ export const createWorkloadUsingOptions = (optionName: string, optionalData?: st const yamlLocation = `support/${optionalData}`; yamlEditor.setEditorContent(yamlLocation); cy.get(chartAreaPO.saveChanges).click(); - cy.get('[aria-label="Breadcrumb"]').should('contain', 'Redis details'); + cy.get('[aria-label="Breadcrumb"]').should('contain', 'details'); navigateTo(devNavigationMenu.Topology); break; diff --git a/frontend/packages/topology/integration-tests/support/pages/topology/topology-edit-deployment.ts b/frontend/packages/topology/integration-tests/support/pages/topology/topology-edit-deployment.ts index f1e29951f768..bcf5abe443e8 100644 --- a/frontend/packages/topology/integration-tests/support/pages/topology/topology-edit-deployment.ts +++ b/frontend/packages/topology/integration-tests/support/pages/topology/topology-edit-deployment.ts @@ -74,6 +74,12 @@ export const editDeployment = { cy.get(topologyPO.deploymentStrategy.preLifecycleHook.failurePolicy).click(); cy.get(`[id="${failurePolicy}-link"]`).click(); cy.get(topologyPO.deploymentStrategy.tickButton).click(); + cy.on('uncaught:exception', (err) => { + expect(err.message).toContain( + 'When Cypress detects uncaught errors originating from your application it will automatically fail the current test.', + ); // .to.include + return false; + }); }, selectProject: (projectName: string) => { cy.get(`[id="${projectName}-link"]`).click(); 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 5df495f990a5..9bd413061f07 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 @@ -286,8 +286,17 @@ export const topologyPage = { }, clickOnApplicationGroupings: (appName: string) => { cy.reload(); + app.waitForLoad(); + guidedTour.close(); const id = `[data-id="group:${appName}"] .odc-resource-icon-application`; - cy.get(id).next('text').click({ force: true }); + cy.log(id); + cy.get('[data-test-id="base-node-handler"] image').should('be.visible'); + cy.get('body').then(($el) => { + if ($el.find(topologyPO.sidePane.applicationGroupingsTitle).length === 0) { + cy.get(id).next('text').click({ force: true }); + } + }); + // cy.get(id).next('text').click({ force: true }); }, verifyApplicationGroupingsDeleted: (appName: string) => { cy.reload(); diff --git a/frontend/packages/topology/integration-tests/support/step-definitions/topology/chart-view.ts b/frontend/packages/topology/integration-tests/support/step-definitions/topology/chart-view.ts index 5288518bcbeb..346a8a50d5e6 100644 --- a/frontend/packages/topology/integration-tests/support/step-definitions/topology/chart-view.ts +++ b/frontend/packages/topology/integration-tests/support/step-definitions/topology/chart-view.ts @@ -216,7 +216,7 @@ Then('user will see {string} modal', (modalName: string) => { Then('user will see alert {string}', (alertName: string) => { app.waitForDocumentLoad(); - cy.get('[aria-label="Default Alert"]').should('be.visible').should('contain', alertName); + cy.get('.modal-body-content').contains(alertName).should('be.visible'); modal.cancel(); }); @@ -297,7 +297,7 @@ When('user clicks on Samples', () => { When('user selects go sample', () => { cy.get(chartAreaPO.filterItem).type('Go'); - cy.get(chartAreaPO.sampleGo).click(); + cy.get(chartAreaPO.sampleBuilderGo).click(); }); When('user hovers on Add to Project and clicks on {string}', (optionName: string) => { @@ -329,9 +329,9 @@ When('user selects Postgres Database and clicks on Instantiate Template', () => cy.get(chartAreaPO.overlayCreate).click({ force: true }); }); -When('user selects Redis and clicks on Create', () => { - cy.get(chartAreaPO.filterItem).type('redis'); - cy.get(chartAreaPO.operatorBackedRedis).click(); +When('user selects {string} and clicks on Create', (operator: string) => { + cy.get(chartAreaPO.filterItem).type(operator); + cy.get(chartAreaPO.operatorBackedPostgres).click(); cy.get(chartAreaPO.overlayCreate).click({ force: true }); }); @@ -360,7 +360,7 @@ Then( 'hello-openshift', 'python-app', 'postgres', - 'redis-standalone', + 'hippo', 'helm-nodejs', 'api-server-source', 'channel', diff --git a/frontend/packages/topology/integration-tests/support/step-definitions/topology/edit-workload.ts b/frontend/packages/topology/integration-tests/support/step-definitions/topology/edit-workload.ts index eb5003486373..37659f7d61fd 100644 --- a/frontend/packages/topology/integration-tests/support/step-definitions/topology/edit-workload.ts +++ b/frontend/packages/topology/integration-tests/support/step-definitions/topology/edit-workload.ts @@ -84,7 +84,7 @@ Then('user will be redirected to Topology with the updated resource limits', () }); When('user selects {string} Strategy type under Deployment Strategy', (strategyType: string) => { - cy.wait(50000); + cy.wait(60000); cy.get(formPO.cancel).click(); editDeployment.selectDeploymentStrategyType(strategyType); }); diff --git a/frontend/packages/topology/integration-tests/support/step-definitions/topology/quick-search-topology.ts b/frontend/packages/topology/integration-tests/support/step-definitions/topology/quick-search-topology.ts index ebd8325f776d..9f4634ec461e 100644 --- a/frontend/packages/topology/integration-tests/support/step-definitions/topology/quick-search-topology.ts +++ b/frontend/packages/topology/integration-tests/support/step-definitions/topology/quick-search-topology.ts @@ -41,7 +41,7 @@ Given('user created a workload and is at topology list view', () => { false, ); navigateTo(devNavigationMenu.Topology); - cy.get(topologyPO.quickSearchPO.listView).click(); + topologyPage.verifyUserIsInListView(); }); Given('user is at topology list view', () => { @@ -101,7 +101,7 @@ Then( ); When('user selects .Net core option', () => { - cy.get(topologyPO.quickSearchPO.NETSample).click(); + cy.get(topologyPO.quickSearchPO.NETSample).should('have.length', '2').eq(1).click(); }); When('user clicks on Create Application', () => { @@ -151,7 +151,7 @@ Then('user will be redirected to the search results of the Quick Starts Catalog' }); When('user selects Basic NodeJS Devfiles option', () => { - cy.get(topologyPO.quickSearchPO.nodejsDevfiles).click(); + cy.get(topologyPO.quickSearchPO.nodejsDevfiles).eq(0).click(); }); When('user clicks on Create button in the Import from Devfile page', () => { @@ -171,7 +171,7 @@ Then( ); When('user selects Basic NodeJS Samples option', () => { - cy.get(topologyPO.quickSearchPO.nodejsSamples).click(); + cy.get(topologyPO.quickSearchPO.nodejsDevfiles).eq(1).click(); }); When('user clicks on Create Devfile Samples', () => { diff --git a/frontend/packages/topology/integration-tests/support/step-definitions/topology/resource-quota-warning.ts b/frontend/packages/topology/integration-tests/support/step-definitions/topology/resource-quota-warning.ts index 12c369fb8fe4..250582e3f179 100644 --- a/frontend/packages/topology/integration-tests/support/step-definitions/topology/resource-quota-warning.ts +++ b/frontend/packages/topology/integration-tests/support/step-definitions/topology/resource-quota-warning.ts @@ -1,5 +1,6 @@ import { Given, When, Then, And } from 'cypress-cucumber-preprocessor/steps'; import { detailsPage } from '@console/cypress-integration-tests/views/details-page'; +import { guidedTour } from '@console/cypress-integration-tests/views/guided-tour'; import { listPage } from '@console/cypress-integration-tests/views/list-page'; import { modal } from '@console/cypress-integration-tests/views/modal'; import * as yamlView from '@console/cypress-integration-tests/views/yaml-editor'; @@ -33,7 +34,9 @@ Given('user has created workload with resource type deployment', () => { }); Given('user has created two resource quotas using {string} file', (yamlLocation) => { - cy.exec(`oc apply -f ${yamlLocation} -n ${Cypress.env('NAMESPACE')}`); + cy.exec(`oc apply -f ${yamlLocation} -n ${Cypress.env('NAMESPACE')}`).then(function (result) { + cy.log(result.stdout); + }); app.waitForDocumentLoad(); }); @@ -43,6 +46,9 @@ When('user navigates to Topology page', () => { }); When('user clicks on link to view resource quota details', () => { + cy.reload(); + app.waitForLoad(); + guidedTour.close(); cy.byTestID('resource-quota-warning').click(); }); diff --git a/frontend/packages/topology/integration-tests/support/step-definitions/topology/workload-sidebar.ts b/frontend/packages/topology/integration-tests/support/step-definitions/topology/workload-sidebar.ts index 888a3d673500..1fe26517fc7a 100644 --- a/frontend/packages/topology/integration-tests/support/step-definitions/topology/workload-sidebar.ts +++ b/frontend/packages/topology/integration-tests/support/step-definitions/topology/workload-sidebar.ts @@ -1,9 +1,14 @@ import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'; -import { devNavigationMenu } from '@console/dev-console/integration-tests/support/constants'; +import { guidedTour } from '@console/cypress-integration-tests/views/guided-tour'; +import { + devNavigationMenu, + switchPerspective, +} from '@console/dev-console/integration-tests/support/constants'; import { app, createGitWorkload, navigateTo, + perspective, projectNameSpace, topologyActions, } from '@console/dev-console/integration-tests/support/pages'; @@ -85,6 +90,7 @@ When('user enters key as {string}', (annotationKey: string) => { When('user enters value as {string}', (annotationValue: string) => { cy.get(topologyPO.deploymentStrategy.envValue).last().clear().type(annotationValue); cy.get(topologyPO.graph.deleteWorkload).click(); + cy.byLegacyTestID('modal-title').should('not.exist', { timeout: 20000 }); }); Then('user can see route decorator has been hidden for workload {string}', (appName: string) => { @@ -150,10 +156,21 @@ When('user clicks on {string} from action menu', (actionItem: string) => { topologyActions.selectAction(actionItem); }); +Then('user can see show waiting pods with errors', () => { + topologySidePane.selectTab('Resources'); + cy.get(topologyPO.sidePane.resourcesTab.waitingPods).should('be.visible'); +}); + Then('user can see traffic details for pod', () => { topologySidePane.selectTab('Resources'); topologySidePane.verifySection('Pods'); + cy.wait(20000); + cy.reload(true); + app.waitForLoad(); + guidedTour.close(); cy.get(topologyPO.sidePane.resourcesTab.waitingPods, { timeout: 100000 }).should('not.exist'); + perspective.switchTo(switchPerspective.Administrator); + perspective.switchTo(switchPerspective.Developer); cy.get(topologyPO.sidePane.resourcesTab.podTrafficStatus, { timeout: 100000 }).should( 'be.visible', );