Skip to content

Commit

Permalink
[TA] Automates bug MTA-3440 (#1200)
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

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

	modified:   cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis_without_creds.test.ts
	modified:   cypress/fixtures/analysis.json
  • Loading branch information
kpunwatk authored Sep 3, 2024
1 parent 3cd478e commit 4a4749c
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 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 @@ -27,14 +27,17 @@ 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 { AnalysisStatuses, TaskKind, TaskStatus, tdTag, trTag } from "../../../../types/constants";
import { analysisColumn } from "../../../../views/analysis.view";
let applicationsList: Array<Analysis> = [];
let application: Analysis;

// TODO (mguetta1): mark it as tier0 once enabling CI again
describe(["@tier1"], "Source Analysis without credentials", () => {
before("Load data", function () {
before("Login", function () {
login();
});
beforeEach("Load data", function () {
cy.fixture("application").then(function (appData) {
this.appData = appData;
});
Expand Down Expand Up @@ -84,6 +87,32 @@ 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"])
);
application.create();
applicationsList.push(application);
cy.wait("@getApplication");
cy.wait(2000);
application.analyze();
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"),
AnalysisStatuses.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 4a4749c

Please sign in to comment.