From 154118e0b367d169b860d7043e6284c390fdf664 Mon Sep 17 00:00:00 2001 From: kpunwatk Date: Tue, 13 Aug 2024 17:35:10 +0530 Subject: [PATCH] [WIP] Automate bug tackle-testapp-public using 4 targets for analysis Signed-off-by: Karishma Punwatkar modified: cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis_without_creds.test.ts modified: cypress/fixtures/analysis.json modified: cypress/fixtures/application.json modified: cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis_without_creds.test.ts modified: cypress/fixtures/analysis.json modified: cypress/fixtures/application.json --- .../source_analysis_without_creds.test.ts | 19 ++++++++++++++++++- cypress/fixtures/analysis.json | 6 ++++++ cypress/fixtures/application.json | 4 ++++ 3 files changed, 28 insertions(+), 1 deletion(-) 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..4033596e7 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,7 +26,7 @@ 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 } from "../../../../types/constants"; import { TaskManager } from "../../../../models/migration/task-manager/task-manager"; let applicationsList: Array = []; let application: Analysis; @@ -74,6 +74,23 @@ describe(["@tier1"], "Source Analysis without credentials", () => { TaskManager.verifyStatus(application.name, succeeded); }); + // Automates bug MTA-3422 + it("4 targets source analysis on tackle app public", function () { + const application = new Analysis( + getRandomApplicationData("tackle-public-4-targets", { + sourceData: this.appData["tackle-testapp-public"], + }), + getRandomAnalysisData(this.analysisData["tackle-testapp-public-4-targets"]) + ); + Application.open(); + application.create(); + applicationsList.push(application); + cy.wait(5 * SEC); + application.analyze(); + application.verifyAnalysisStatus("Completed"); + application.verifyEffort(this.analysisData["tackle-testapp-public-4-targets"]["effort"]); + }); + 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 9d613e416..2ba8a2bd1 100644 --- a/cypress/fixtures/analysis.json +++ b/cypress/fixtures/analysis.json @@ -1197,5 +1197,11 @@ "target": [], "appName": "fileNotValidXML custom rules", "customRule": ["settings.xml"] + }, + "tackle-testapp-public-4-targets": { + "appName": "tackle-testapp-public", + "source": "Source code", + "target": ["Application server migration to", "OpenJDK", "Containerization", "Linux"], + "effort": 20 } } diff --git a/cypress/fixtures/application.json b/cypress/fixtures/application.json index 9930a8232..979864228 100644 --- a/cypress/fixtures/application.json +++ b/cypress/fixtures/application.json @@ -71,5 +71,9 @@ "java-example-app": { "repoType": "Git", "sourceRepo": "https://github.com/ibraginsky/book-server" + }, + "tackle-testapp-public": { + "repoType": "Git", + "sourceRepo": "https://github.com/konveyor/tackle-testapp-public" } }