From e89442ee3764605a724589dd087b32cf5aef47fc 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 modified: cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis_without_creds.test.ts modified: cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis.test.ts modified: cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis_without_creds.test.ts modified: cypress/fixtures/analysis.json modified: cypress/fixtures/application.json --- .../analysis/source_analysis.test.ts | 18 ++++++++++++++++++ .../source_analysis_without_creds.test.ts | 2 +- cypress/fixtures/analysis.json | 6 ++++++ cypress/fixtures/application.json | 4 ++++ 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis.test.ts b/cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis.test.ts index dce65bd0e..087c619de 100644 --- a/cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis.test.ts +++ b/cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis.test.ts @@ -328,6 +328,24 @@ describe(["@tier1"], "Source Analysis", () => { application.verifyAnalysisStatus(AnalysisStatuses.completed); }); + // 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"]) + ); + cy.wait(2 * SEC); + 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 () { deleteByList(applicationsList); writeMavenSettingsFile(data.getRandomWord(5), data.getRandomWord(5)); 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..5cd31e007 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; 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" } }