diff --git a/cypress/e2e/models/migration/applicationinventory/application.ts b/cypress/e2e/models/migration/applicationinventory/application.ts index bb6f7e631..d0afc102d 100644 --- a/cypress/e2e/models/migration/applicationinventory/application.ts +++ b/cypress/e2e/models/migration/applicationinventory/application.ts @@ -155,7 +155,7 @@ export class Application { public static open(forceReload = false): void { const itemsPerPage = 100; if (forceReload) { - cy.visit(Application.fullUrl, { timeout: 15 * SEC }).then((_) => + cy.visit(Application.fullUrl, { timeout: 30 * SEC }).then((_) => selectItemsPerPage(itemsPerPage) ); return; @@ -510,10 +510,7 @@ export class Application { validateTextPresence('td[data-label="Business service"]', this.business); } // Validating total effort for fixing issue, it is basic effort from main issue page multiplied on incidents amount - validateNumberPresence( - 'td[data-label="Total Effort"]', - appIssue.effort * appIssue.incidents - ); + validateNumberPresence('td[data-label="Total Effort"]', appIssue.totalEffort); validateNumberPresence('td[data-label="Incidents"]', appIssue.incidents); }); } diff --git a/cypress/e2e/models/migration/dynamic-report/issues/issues.ts b/cypress/e2e/models/migration/dynamic-report/issues/issues.ts index a095de3be..a849b4a9e 100644 --- a/cypress/e2e/models/migration/dynamic-report/issues/issues.ts +++ b/cypress/e2e/models/migration/dynamic-report/issues/issues.ts @@ -138,7 +138,7 @@ export class Issues { Issues.validateSection(sections.sourceTechnologies, div, issue.source); Issues.validateSection(sections.ruleSet, div, issue.ruleSet); Issues.validateSection(sections.rule, div, issue.rule); - Issues.validateSection(sections.labels, span, issue.labels); + Issues.validateSection(sections.labels, div, issue.labels); } private static validateSection( diff --git a/cypress/e2e/tests/migration/applicationinventory/analysis/affected_files.test.ts b/cypress/e2e/tests/migration/applicationinventory/analysis/affected_files.test.ts index 656db471c..26bfa10cb 100644 --- a/cypress/e2e/tests/migration/applicationinventory/analysis/affected_files.test.ts +++ b/cypress/e2e/tests/migration/applicationinventory/analysis/affected_files.test.ts @@ -70,28 +70,6 @@ describe(["@tier2"], "Bug MTA-2006: Affected files validation", () => { Application.open(true); }); - it("Bug MTA-2006: Affected files validation with Source + dependencies analysis on daytrader app", function () { - // Automate bug https://issues.redhat.com/browse/MTA-2006 - const application = new Analysis( - getRandomApplicationData("affected_files_on_day_trader_app", { - sourceData: this.appData["daytrader-app"], - }), - getRandomAnalysisData(this.analysisData["affected_files_on_day_trader_app"]) - ); - application.create(); - applicationsList.push(application); - cy.wait("@getApplication"); - cy.wait(2 * SEC); - application.analyze(); - application.verifyAnalysisStatus("Completed"); - application.validateIssues(this.analysisData["affected_files_on_day_trader_app"]["issues"]); - this.analysisData["affected_files_on_day_trader_app"]["issues"].forEach( - (currentIssue: AppIssue) => { - application.validateAffected(currentIssue); - } - ); - }); - it("Affected files validation with source analysis on bookserver app", function () { // Automate bug https://issues.redhat.com/browse/MTA-1628 const application = new Analysis( @@ -161,6 +139,28 @@ describe(["@tier2"], "Bug MTA-2006: Affected files validation", () => { ); }); + it("Bug MTA-2006: Affected files validation with Source + dependencies analysis on daytrader app", function () { + // Automate bug https://issues.redhat.com/browse/MTA-2006 + const application = new Analysis( + getRandomApplicationData("affected_files_on_day_trader_app", { + sourceData: this.appData["daytrader-app"], + }), + getRandomAnalysisData(this.analysisData["affected_files_on_day_trader_app"]) + ); + application.create(); + applicationsList.push(application); + cy.wait("@getApplication"); + cy.wait(2 * SEC); + application.analyze(); + application.verifyAnalysisStatus("Completed"); + application.validateIssues(this.analysisData["affected_files_on_day_trader_app"]["issues"]); + this.analysisData["affected_files_on_day_trader_app"]["issues"].forEach( + (currentIssue: AppIssue) => { + application.validateAffected(currentIssue); + } + ); + }); + after("Perform test data clean up", function () { deleteByList(applicationsList); }); diff --git a/cypress/e2e/tests/migration/dynamic-report/issues/filter.sorting.pagination.test.ts b/cypress/e2e/tests/migration/dynamic-report/issues/filter.sorting.pagination.test.ts index f0f953f44..544ff88a3 100644 --- a/cypress/e2e/tests/migration/dynamic-report/issues/filter.sorting.pagination.test.ts +++ b/cypress/e2e/tests/migration/dynamic-report/issues/filter.sorting.pagination.test.ts @@ -20,7 +20,7 @@ import { Stakeholdergroups } from "../../../../models/migration/controls/stakeho import { Tag } from "../../../../models/migration/controls/tags"; import { Issues } from "../../../../models/migration/dynamic-report/issues/issues"; import { AppIssue } from "../../../../types/types"; -import { AnalysisStatuses, issueFilter, SEC, trTag } from "../../../../types/constants"; +import { AnalysisStatuses, issueFilter, trTag } from "../../../../types/constants"; import { randomWordGenerator } from "../../../../../utils/data_utils"; describe(["@tier3"], "Filtering, sorting and pagination in Issues", function () { @@ -32,7 +32,7 @@ describe(["@tier3"], "Filtering, sorting and pagination in Issues", function () let tags: Tag[]; let tagNames: string[]; const allIssuesSortByList = ["Issue", "Category", "Effort", "Affected applications"]; - const affectedApplicationSortByList = ["Name", "Business service", "Effort", "Incidents"]; + const affectedApplicationSortByList = ["Name", "Business service", "Total Effort", "Incidents"]; const singleApplicationSortByList = ["Issue", "Category", "Effort", "Affected files"]; before("Login", function () { diff --git a/cypress/e2e/types/types.ts b/cypress/e2e/types/types.ts index 1e9380eca..5111fc679 100644 --- a/cypress/e2e/types/types.ts +++ b/cypress/e2e/types/types.ts @@ -196,6 +196,7 @@ export type AppIssue = { source: string; targets: string[]; effort: number; + totalEffort?: number; incidents: number; affectedFiles: number; tags?: string[]; diff --git a/cypress/fixtures/analysis.json b/cypress/fixtures/analysis.json index 3baa31ba7..d76e07a89 100644 --- a/cypress/fixtures/analysis.json +++ b/cypress/fixtures/analysis.json @@ -317,7 +317,8 @@ "source": "java-ee", "targets": ["quarkus"], "effort": 1, - "incidents": 2, + "totalEffort": 9, + "incidents": 1, "affectedFiles": 1, "ruleSet": "quarkus/springboot", "rule": "javaee-pom-to-quarkus-00060", @@ -337,6 +338,7 @@ "source": "java-ee", "targets": ["quarkus"], "effort": 1, + "totalEffort": 8, "incidents": 1, "affectedFiles": 1, "ruleSet": "quarkus/springboot", @@ -350,6 +352,7 @@ "source": "Source code + dependencies", "target": ["Camel"], "appName": "tackle-testapp", + "openSourceLibraries": true, "issues": [ { "name": "'jaxb-core' Maven dependency missing", @@ -357,6 +360,7 @@ "source": "camel", "targets": ["camel"], "effort": 1, + "totalEffort": 4, "incidents": 1, "affectedFiles": 1, "ruleSet": "camel3/camel2", diff --git a/cypress/utils/utils.ts b/cypress/utils/utils.ts index 105ea783b..517f49a36 100644 --- a/cypress/utils/utils.ts +++ b/cypress/utils/utils.ts @@ -273,6 +273,7 @@ export function selectItemsPerPage(items: number): void { cy.get(`li[data-action="per-page-${items}"]`, { log: false }) .contains(`${items}`) .click({ + timeout: 30 * SEC, force: true, log: false, });