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

	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

	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

	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

	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 30, 2024
1 parent 49b5dbd commit 435d7b6
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,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 @@ -21,13 +21,15 @@ import {
getRandomAnalysisData,
deleteByList,
checkSuccessAlert,
waitUntilSpinnerIsGone,
} from "../../../../../utils/utils";
import { Analysis } from "../../../../models/migration/applicationinventory/analysis";
import { infoAlertMessage } from "../../../../views/common.view";
import { AppIssue } from "../../../../types/types";
import { Application } from "../../../../models/migration/applicationinventory/application";
import { TaskManager } from "../../../../models/migration/task-manager/task-manager";
import { TaskKind, TaskStatus } from "../../../../types/constants";
import { TaskKind, TaskStatus, tdTag, trTag } from "../../../../types/constants";
import { analysisColumn } from "../../../../views/analysis.view";
let applicationsList: Array<Analysis> = [];
let application: Analysis;

Expand Down Expand Up @@ -84,6 +86,35 @@ describe(["@tier1"], "Source Analysis without credentials", () => {
);
});

// Automates Bug https://issues.redhat.com/browse/MTA-3440
it("Source analysis on bookserver app with EAP8 target", function () {
const Application = new Analysis(
getRandomApplicationData("eap8-bookserverApp", {
sourceData: this.appData["bookserver-app"],
}),
getRandomAnalysisData(this.analysisData["EAP8_bookserverapp"])
);
Analysis.open();
waitUntilSpinnerIsGone;
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
7 changes: 6 additions & 1 deletion cypress/fixtures/analysis.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"source_analysis_on_bookserverapp": {
"source": "Source code",
"target": ["Containerization", "Linux", "Quarkus"],
"appName": "book-server",
"appName": "bookserver-app",
"tags": ["EJB XML", "Java EE Batch", "EJB XML"],
"issues": [
{
Expand Down Expand Up @@ -1220,5 +1220,10 @@
"labels": ["None"]
}
]
},
"EAP8_bookserverapp": {
"appName": "bookserver-app",
"source": "Source code",
"target": ["Application server migration to"]
}
}

0 comments on commit 435d7b6

Please sign in to comment.