Skip to content

Commit

Permalink
[RFR] Fix source analysis custom rule test case
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.test.ts
  • Loading branch information
kpunwatk committed Dec 16, 2024
1 parent dc9465e commit 696c3ff
Showing 1 changed file with 23 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -368,47 +368,48 @@ describe(["@tier1"], "Source Analysis", () => {

// Automates customer bug MTA-2973
it("Source analysis on tackle app public with custom rule", function () {
const applicationList = [
new Analysis(
getRandomApplicationData("tackle-public-customRule", {
sourceData: this.appData["tackle-testapp-public"],
}),
getRandomAnalysisData(this.analysisData["tackle-testapp-public-customRule"])
),
];

for (let i = 0; i < 2; i++) {
applicationsList.push(
new Analysis(
getRandomApplicationData("tackle-public-customRule", {
sourceData: this.appData["tackle-testapp-public"],
}),
getRandomAnalysisData(this.analysisData["tackle-testapp-public-customRule"])
)
);
}
// Analysis application with maven credential
cy.wait(2 * SEC);
Application.open();
applicationList[0].create();
applicationList[0].manageCredentials(null, maven_credential.name);
applicationsList.push(applicationList[0]);
applicationsList[0].create();
applicationsList[0].manageCredentials(null, maven_credential.name);
applicationsList.push(applicationsList[0]);
cy.wait(5 * SEC);
applicationList[0].analyze();
applicationList[0].verifyAnalysisStatus("Completed");
applicationList[0].validateIssues(
applicationsList[0].analyze();
applicationsList[0].verifyAnalysisStatus("Completed");
applicationsList[0].validateIssues(
this.analysisData["tackle-testapp-public-customRule"]["issues"]
);
this.analysisData["tackle-testapp-public-customRule"]["issues"].forEach(
(currentIssue: AppIssue) => {
applicationList[0].validateAffected(currentIssue);
applicationsList[0].validateAffected(currentIssue);
}
);

// Analysis application without maven credential
cy.wait(2 * SEC);
Application.open();
applicationList[1].create();
applicationsList.push(applicationList[0]);
applicationsList[1].create();
applicationsList.push(applicationsList[0]);
cy.wait(5 * SEC);
applicationList[1].analyze();
applicationList[1].verifyAnalysisStatus("Completed");
applicationList[1].validateIssues(
applicationsList[1].analyze();
applicationsList[1].verifyAnalysisStatus("Completed");
applicationsList[1].validateIssues(
this.analysisData["tackle-testapp-public-customRule"]["issues"]
);
this.analysisData["tackle-testapp-public-customRule"]["issues"].forEach(
(currentIssue: AppIssue) => {
applicationList[1].validateAffected(currentIssue);
applicationsList[1].validateAffected(currentIssue);
}
);
});
Expand Down

0 comments on commit 696c3ff

Please sign in to comment.