diff --git a/cypress/e2e/models/migration/applicationinventory/analysis.ts b/cypress/e2e/models/migration/applicationinventory/analysis.ts index 9721e7dca..1eed108fd 100644 --- a/cypress/e2e/models/migration/applicationinventory/analysis.ts +++ b/cypress/e2e/models/migration/applicationinventory/analysis.ts @@ -390,7 +390,7 @@ export class Analysis extends Application { }); } - private static verifyStatus(element: Cypress.Chainable, status: string) { + public static verifyStatus(element: Cypress.Chainable, status: string) { element .find("div > div:nth-child(2)", { timeout: 3600000, log: false }) // 1h .should("not.have.text", AnalysisStatuses.notStarted) diff --git a/cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis_without_creds.test.ts b/cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis_without_creds.test.ts index bddef655e..54dfe56d2 100644 --- a/cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis_without_creds.test.ts +++ b/cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis_without_creds.test.ts @@ -26,8 +26,9 @@ import { Analysis } from "../../../../models/migration/applicationinventory/anal import { infoAlertMessage } from "../../../../views/common.view"; import { AppIssue } from "../../../../types/types"; import { Application } from "../../../../models/migration/applicationinventory/application"; -import { succeeded } from "../../../../types/constants"; +import { SEC, succeeded, tdTag, trTag } from "../../../../types/constants"; import { TaskManager } from "../../../../models/migration/task-manager/task-manager"; +import { analysisColumn, effortColumn } from "../../../../views/analysis.view"; let applicationsList: Array = []; let application: Analysis; @@ -74,6 +75,35 @@ describe(["@tier1"], "Source Analysis without credentials", () => { TaskManager.verifyStatus(application.name, succeeded); }); + // Automates Bug https://issues.redhat.com/browse/MTA-3440 + it("Source analysis on bookserver app with EAP8 target", function () { + application = new Analysis( + getRandomApplicationData("bookserverApp", { + sourceData: this.appData["bookserver-app"], + }), + getRandomAnalysisData(this.analysisData["EAP8_bookserverapp"]) + ); + cy.wait(2 * SEC); + Application.open(); + application.create(); + applicationsList.push(application); + cy.wait("@getApplication"); + cy.wait(2000); + application.analyze(); + checkSuccessAlert(infoAlertMessage, `Submitted for analysis`); + cy.get(tdTag, { log: false }) + .contains(application.name) + .closest(trTag, { log: false }) + .within(() => { + Analysis.verifyStatus( + cy + .get(analysisColumn, { log: false }) + .should("not.have.text", "Completed with Errors"), + "Completed" + ); + }); + }); + after("Perform test data clean up", function () { cy.wait(2000); Application.open(true); diff --git a/cypress/fixtures/analysis.json b/cypress/fixtures/analysis.json index 2ff8c7fda..c187e6aee 100644 --- a/cypress/fixtures/analysis.json +++ b/cypress/fixtures/analysis.json @@ -1220,5 +1220,10 @@ "labels": ["None"] } ] + }, + "EAP8_bookserverapp": { + "source": "Source code", + "target": ["Application server migration to"], + "appName": "book-server" } }