Skip to content

Commit

Permalink
[TA] Automates bug MTA-3440
Browse files Browse the repository at this point in the history
Signed-off-by: Karishma Punwatkar <[email protected]>

	modified:   cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis_without_creds.test.ts
	modified:   cypress/fixtures/analysis.json

	modified:   cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis_without_creds.test.ts

	modified:   cypress/e2e/models/migration/applicationinventory/analysis.ts
	modified:   cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis_without_creds.test.ts
	modified:   cypress/fixtures/analysis.json
  • Loading branch information
kpunwatk committed Aug 28, 2024
1 parent 5c2d78f commit 75261d0
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Analysis> = [];
let application: Analysis;

Expand Down Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions cypress/fixtures/analysis.json
Original file line number Diff line number Diff line change
Expand Up @@ -1220,5 +1220,10 @@
"labels": ["None"]
}
]
},
"EAP8_bookserverapp": {
"source": "Source code",
"target": ["Application server migration to"],
"appName": "book-server"
}
}

0 comments on commit 75261d0

Please sign in to comment.