diff --git a/cypress/e2e/models/migration/applicationinventory/analysis.ts b/cypress/e2e/models/migration/applicationinventory/analysis.ts index 70859f268..4ef502219 100644 --- a/cypress/e2e/models/migration/applicationinventory/analysis.ts +++ b/cypress/e2e/models/migration/applicationinventory/analysis.ts @@ -358,9 +358,9 @@ export class Analysis extends Application { openReport() { this.selectApplicationRow(); - cy.get(rightSideMenu, { timeout: 30 * SEC }).within(() => { + cy.get(rightSideMenu, { timeout: 15 * SEC }).within(() => { clickTab("Reports"); - cy.contains("a", "Report", { timeout: 30 * SEC }) + cy.contains("button", "View analysis", { timeout: 15 * SEC }) .then(($a) => { // Removing target from html so that report opens in same tab $a.attr("target", "_self"); diff --git a/cypress/e2e/models/migration/applicationinventory/assessment.ts b/cypress/e2e/models/migration/applicationinventory/assessment.ts index 3aea2e05a..8643222bb 100644 --- a/cypress/e2e/models/migration/applicationinventory/assessment.ts +++ b/cypress/e2e/models/migration/applicationinventory/assessment.ts @@ -36,6 +36,7 @@ import { kebabMenu, northdependenciesDropdownBtn, southdependenciesDropdownBtn, + copyAssessmentModal, } from "../../../views/applicationinventory.view"; import * as commonView from "../../../views/common.view"; import { @@ -480,13 +481,13 @@ export class Assessment extends Application { cy.wait(500); clickByText(button, action); }); - cy.get("div.pf-c-modal-box").within(() => { + cy.get(copyAssessmentModal).within(() => { selectItemsPerPage(items); }); } selectItemsPerPage(items: number): void { - cy.get("div.pf-c-modal-box").within(() => { + cy.get(copyAssessmentModal).within(() => { selectItemsPerPage(items); }); } diff --git a/cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis.test.ts b/cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis.test.ts index a9e72a7cf..10fb71fc8 100644 --- a/cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis.test.ts +++ b/cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis.test.ts @@ -17,7 +17,6 @@ limitations under the License. import { login, - deleteAllBusinessServices, getRandomApplicationData, getRandomAnalysisData, writeMavenSettingsFile, @@ -36,12 +35,10 @@ import { import * as data from "../../../../../utils/data_utils"; import { CredentialsSourceControlUsername } from "../../../../models/administration/credentials/credentialsSourceControlUsername"; import { CredentialsSourceControlKey } from "../../../../models/administration/credentials/credentialsSourceControlKey"; -import { MavenConfiguration } from "../../../../models/administration/repositories/maven"; import { infoAlertMessage } from "../../../../views/common.view"; let source_credential; let maven_credential; -const mavenConfiguration = new MavenConfiguration(); -var applicationsList: Array = []; +let applicationsList: Array = []; describe(["@tier1"], "Source Analysis", () => { before("Login", function () { @@ -98,8 +95,6 @@ describe(["@tier1"], "Source Analysis", () => { application.analyze(); checkSuccessAlert(infoAlertMessage, `Submitted for analysis`); application.verifyAnalysisStatus("Completed"); - application.openReport(); - application.validateStoryPoints(); }); it("Source + dependencies analysis on tackletest app", function () { @@ -117,8 +112,6 @@ describe(["@tier1"], "Source Analysis", () => { application.manageCredentials(source_credential.name, maven_credential.name); application.analyze(); application.verifyAnalysisStatus("Completed"); - application.openReport(); - application.validateStoryPoints(); }); it("Source + dependencies analysis on daytrader app", function () { @@ -135,8 +128,6 @@ describe(["@tier1"], "Source Analysis", () => { cy.wait(2000); application.analyze(); application.verifyAnalysisStatus("Completed"); - application.openReport(); - application.validateStoryPoints(); }); it("Analysis on daytrader app with maven credentials", function () { @@ -154,8 +145,6 @@ describe(["@tier1"], "Source Analysis", () => { application.manageCredentials(null, maven_credential.name); application.analyze(); application.verifyAnalysisStatus("Completed"); - application.openReport(); - application.validateStoryPoints(); }); it("Source Analysis on tackle testapp", function () { @@ -173,8 +162,6 @@ describe(["@tier1"], "Source Analysis", () => { application.manageCredentials(source_credential.name, null); application.analyze(); application.verifyAnalysisStatus("Completed"); - application.openReport(); - application.validateStoryPoints(); }); it("Analysis on tackle test app with ssh credentials", function () { @@ -199,8 +186,6 @@ describe(["@tier1"], "Source Analysis", () => { application.manageCredentials(scCredsKey.name, null); application.analyze(); application.verifyAnalysisStatus("Completed"); - application.openReport(); - application.validateStoryPoints(); }); it("Source Analysis on tackle testapp for svn repo type", function () { @@ -218,8 +203,6 @@ describe(["@tier1"], "Source Analysis", () => { application.manageCredentials(source_credential.name, null); application.analyze(); application.verifyAnalysisStatus("Completed"); - application.openReport(); - application.validateStoryPoints(); }); it("Analysis for known Open Source libraries on tackleTest app", function () { @@ -237,8 +220,6 @@ describe(["@tier1"], "Source Analysis", () => { application.manageCredentials(source_credential.name, maven_credential.name); application.analyze(); application.verifyAnalysisStatus("Completed"); - application.openReport(); - application.validateStoryPoints(); }); it("Automated tagging using Source Analysis on tackle testapp", function () { @@ -294,13 +275,10 @@ describe(["@tier1"], "Source Analysis", () => { cy.wait(2000); application.analyze(); application.verifyAnalysisStatus(AnalysisStatuses.completed); - application.openReport(); - application.validateStoryPoints(); }); after("Perform test data clean up", function () { deleteByList(applicationsList); - deleteAllBusinessServices(); writeMavenSettingsFile(data.getRandomWord(5), data.getRandomWord(5)); }); }); diff --git a/cypress/e2e/views/applicationinventory.view.ts b/cypress/e2e/views/applicationinventory.view.ts index 28a0bd69b..cc4eab247 100644 --- a/cypress/e2e/views/applicationinventory.view.ts +++ b/cypress/e2e/views/applicationinventory.view.ts @@ -28,8 +28,6 @@ export const csvFileName = "File name"; export const FileName = "File Name"; export const closeForm = "button[aria-label='close']"; export const copy = "button[aria-label='Copy']"; -export const copyAssessmentTableTd = ".pf-m-compact> tbody > tr > td"; -export const copyAssessmentTableTr = ".pf-m-compact> tbody > tr"; export const cyclicDependenciesErrorMsg = "cyclic dependencies are not allowed"; export const northdependenciesDropdownBtn = "button[aria-label='northbound-dependencies-toggle']"; export const southdependenciesDropdownBtn = "button[aria-label='southbound-dependencies-toggle']"; @@ -43,7 +41,6 @@ export const selectBox = "input[type=checkbox]"; export const tags = "span"; export const user = "User"; export const kebabMenu = "td[class='pf-v5-c-table__td pf-v5-c-table__action'] > button"; -export const copyAssessmentPagination = "#bulk-copy-assessment-review-pagination-top"; //Fields related to analysis - source mode export const sourceRepository = "input[name=sourceRepository]"; @@ -61,10 +58,16 @@ export const createEntitiesCheckbox = "#create-entities-checkbox"; //Fields related to application details page export enum appDetailsView { - applicationTag = "span.pf-c-label__content", + applicationTag = "span.pf-v5-c-label__content", closeDetailsPage = "button[aria-label='Close drawer panel']", tagFilter = "#source-filter-value-select", - tagCategory = "div[class='pf-c-content'] > h4", - filterSourceMenu = "div.pf-c-select__menu", + tagCategory = "div[class='pf-v5-c-content'] > h4", + filterSourceMenu = "div.pf-v5-c-select__menu", tagCategoryFilter = "#tagCategory-filter-value-select", } + +// Fields related to copy assessment modal +export const copyAssessmentTableTd = ".pf-m-compact> tbody > tr > td"; +export const copyAssessmentTableTr = ".pf-m-compact> tbody > tr"; +export const copyAssessmentPagination = "#bulk-copy-assessment-review-pagination-top"; +export const copyAssessmentModal = "div.pf-v5-c-modal-box"; diff --git a/cypress/e2e/views/common.view.ts b/cypress/e2e/views/common.view.ts index bd8d07b03..c2f7665bc 100644 --- a/cypress/e2e/views/common.view.ts +++ b/cypress/e2e/views/common.view.ts @@ -27,7 +27,7 @@ export const itemsPerPageMenu = "div.pf-c-options-menu"; export const itemsPerPageMenuOptions = "ul.pf-v5-c-menu__list"; export const expandRow = "button[aria-label=Details]"; export const successAlertMessage = ".pf-m-success"; -export const infoAlertMessage = "div[aria-label='Info Alert']"; +export const infoAlertMessage = ".pf-m-info"; export const duplicateNameWarning = "h4[class*='alert__title']"; export const appTable = "table[aria-label='main-table']"; export const expandableRow = ".pf-c-expandable-row"; diff --git a/cypress/fixtures/analysis.json b/cypress/fixtures/analysis.json index 4b89ce853..ae2763ecd 100644 --- a/cypress/fixtures/analysis.json +++ b/cypress/fixtures/analysis.json @@ -51,12 +51,10 @@ "storyPoints": 1, "techTags": [ ["HTTP", "Servlet"], - ["MVC", "Spring MVC"], - ["Observability", "Spring Boot Actuator"], - ["Other", "Properties"], - ["Persistence", "JPA entities"], - ["Persistence", "Spring Data JPA"], - ["Web", "Spring Web"] + ["Processing", "Java EE Batch"], + ["Java EE", "Java EE Batch"], + ["Execute", "Java EE Batch"], + ["Connect", "Servlet"] ] },