Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFR] Added assessment to pre-upgrade test #943

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion cypress/e2e/tests/upgrade/create_upgrade_data.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@ import { getRandomCredentialsData } from "../../../utils/data_utils";
import { Analysis } from "../../models/migration/applicationinventory/analysis";
import { UpgradeData } from "../../types/types";
import { CredentialsMaven } from "../../models/administration/credentials/credentialsMaven";
import { Assessment } from "../../models/migration/applicationinventory/assessment";

describe(["@pre-upgrade"], "Creating pre-requisites before an upgrade", () => {
let mavenCredentialsUsername: CredentialsMaven;
let sourceControlUsernameCredentials: CredentialsSourceControlUsername;
const assessment = new Assessment(getRandomApplicationData());
let stakeHolder: Stakeholders;

before("Login", function () {
// Perform login
Expand Down Expand Up @@ -92,7 +95,7 @@ describe(["@pre-upgrade"], "Creating pre-requisites before an upgrade", () => {
// Defining stakeholder groups
const stakeHolderGroup = new Stakeholdergroups(stakeHolderGroupName);
// Defining stakeholders
const stakeHolder = new Stakeholders("[email protected]", stakeHolderName, jobFunctionName, [
stakeHolder = new Stakeholders("[email protected]", stakeHolderName, jobFunctionName, [
stakeHolderGroupName,
]);
// Defining business Service
Expand Down Expand Up @@ -122,6 +125,7 @@ describe(["@pre-upgrade"], "Creating pre-requisites before an upgrade", () => {
cy.wait(2 * SEC);
sourceApplication.analyze();
sourceApplication.verifyAnalysisStatus("Completed");
sourceApplication.selectApplicationRow();
});

it("Creating Upload Binary Analysis", function () {
Expand All @@ -135,6 +139,7 @@ describe(["@pre-upgrade"], "Creating pre-requisites before an upgrade", () => {
// No credentials required for uploaded binary.
uploadBinaryApplication.analyze();
uploadBinaryApplication.verifyAnalysisStatus("Completed");
uploadBinaryApplication.selectApplicationRow();
});

it("Binary Analysis", function () {
Expand All @@ -155,5 +160,12 @@ describe(["@pre-upgrade"], "Creating pre-requisites before an upgrade", () => {
);
binaryApplication.analyze();
binaryApplication.verifyAnalysisStatus("Completed");
binaryApplication.selectApplicationRow();
});

it("Assess application", function () {
assessment.name = this.upgradeData.assessmentName;
assessment.create();
assessment.perform_assessment("low", [stakeHolder.name]);
});
});
1 change: 1 addition & 0 deletions cypress/e2e/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ export type RbacValidationRules = {
};

export type UpgradeData = {
assessmentName?: string;
jobFunctionName?: string;
stakeHolderGroupName?: string;
stakeHolderName?: string;
Expand Down
1 change: 1 addition & 0 deletions cypress/fixtures/upgrade-data.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"assessmentName": "upgrade-assessment",
"jobFunctionName": "upgrade-jobFunction",
"stakeHolderGroupName": "upgrade-stakeHolderGroup",
"stakeHolderName": "upgrade-stakeHolder",
Expand Down
Loading