Skip to content

Commit

Permalink
Disabling imported questionnaire after check (#1110)
Browse files Browse the repository at this point in the history
Signed-off-by: Maayan Hadasi <[email protected]>
  • Loading branch information
mguetta1 authored May 15, 2024
1 parent 75af333 commit 4ca5461
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion cypress/e2e/tests/upgrade/after_upgrade.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import { MavenConfiguration } from "../../models/administration/repositories/mav
import { clearRepository } from "../../views/repository.view";
import { stakeHoldersTable } from "../../views/stakeholders.view";
import { AssessmentQuestionnaire } from "../../models/administration/assessment_questionnaire/assessment_questionnaire";
import { legacyPathfinder } from "../../types/constants";
import { cloudReadinessQuestionnaire, legacyPathfinder } from "../../types/constants";
import { Application } from "../../models/migration/applicationinventory/application";
import { Archetype } from "../../models/migration/archetypes/archetype";

Expand Down Expand Up @@ -171,11 +171,13 @@ describe(["@post-upgrade"], "Performing post-upgrade validations", () => {

it("Verify that imported questionnaire assessement is migrated", function () {
AssessmentQuestionnaire.disable(legacyPathfinder);
AssessmentQuestionnaire.enable(cloudReadinessQuestionnaire);
const assessmentApplication = new Application({
name: this.upgradeData.importedQuestionnaireAppName,
});
assessmentApplication.verifyStatus("assessment", "Completed");
assessmentApplication.validateAssessmentField("Medium");
AssessmentQuestionnaire.disable(cloudReadinessQuestionnaire);
AssessmentQuestionnaire.enable(legacyPathfinder);
});

Expand Down
5 changes: 3 additions & 2 deletions cypress/e2e/tests/upgrade/create_upgrade_data.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ describe(["@pre-upgrade"], "Creating pre-requisites before an upgrade", () => {
[stakeHolderGroup]
);
archetype.create();
archetype.perform_assessment("Low", [stakeHolder], [stakeHolderGroup]);
archetype.perform_assessment("low", [stakeHolder], [stakeHolderGroup]);
archetype.validateAssessmentField("Low");
});

Expand Down Expand Up @@ -221,13 +221,14 @@ describe(["@pre-upgrade"], "Creating pre-requisites before an upgrade", () => {
application.name = this.upgradeData.importedQuestionnaireAppName;
application.create();
application.perform_assessment(
"Medium",
"medium",
[stakeHolder],
[stakeHolderGroup],
cloudReadinessQuestionnaire
);

application.verifyStatus("assessment", "Completed");
AssessmentQuestionnaire.enable(legacyPathfinder);
AssessmentQuestionnaire.disable(cloudReadinessQuestionnaire);
});
});

0 comments on commit 4ca5461

Please sign in to comment.