Skip to content

Commit

Permalink
[RFR] Perform application asessment/review of application associated …
Browse files Browse the repository at this point in the history
…with unassessed archetypes (#930)

* Perform application asessment/review of application associated with unassessed archetypes

Signed-off-by: Nandini Chandra <[email protected]>

* Minor changes

Signed-off-by: Nandini Chandra <[email protected]>

* Enable Legacy Pathfinder questionnaire

Signed-off-by: Nandini Chandra <[email protected]>

* fixed type in questionnaire method name

Signed-off-by: Nandini Chandra <[email protected]>

* Delete all questionnaires

Signed-off-by: Nandini Chandra <[email protected]>

* Delete all questionnaires

Signed-off-by: Nandini Chandra <[email protected]>

* Update clean up code

Signed-off-by: Nandini Chandra <[email protected]>

* Minor change

Signed-off-by: Nandini Chandra <[email protected]>

---------

Signed-off-by: Nandini Chandra <[email protected]>
  • Loading branch information
nachandr authored Jan 26, 2024
1 parent 01613f1 commit 2a73e89
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class AssessmentQuestionnaire {
});
}

public static deleteAllQuesionnaire() {
public static deleteAllQuestionnaires() {
AssessmentQuestionnaire.open();
selectItemsPerPage(100);
cy.get(commonView.commonTable)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe(["@tier2"], "Questionnaire CRUD operations", () => {
before("Login", function () {
login();
// This test will fail if there are preexisting questionnaire.
AssessmentQuestionnaire.deleteAllQuesionnaire();
AssessmentQuestionnaire.deleteAllQuestionnaires();
});

it("Import questionnaire", function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe(["@tier2"], "Tests related to application-archetype association ", () =
tags = createMultipleTags(2);
stakeholders = createMultipleStakeholders(1);

AssessmentQuestionnaire.deleteAllQuesionnaire();
AssessmentQuestionnaire.deleteAllQuestionnaires();
AssessmentQuestionnaire.enable(legacyPathfinder);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe(["@tier1"], "Application assessment and review tests", () => {
before("Login and Create Test Data", function () {
login();
// This test will fail if there are preexisting questionnaire.
AssessmentQuestionnaire.deleteAllQuesionnaire();
AssessmentQuestionnaire.deleteAllQuestionnaires();
AssessmentQuestionnaire.enable(legacyPathfinder);

stakeholders = createMultipleStakeholders(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe(["@tier2"], "Operations after application import", () => {
before("Login and create test data", function () {
login();
// This test will fail if there are preexisting questionnaire.
AssessmentQuestionnaire.deleteAllQuesionnaire();
AssessmentQuestionnaire.deleteAllQuestionnaires();
AssessmentQuestionnaire.enable(legacyPathfinder);
stakeholders = createMultipleStakeholders(1);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
clickByText,
createMultipleStakeholders,
createMultipleTags,
createMultipleArchetypes,
click,
} from "../../../../../utils/utils";
import { Stakeholders } from "../../../../models/migration/controls/stakeholders";
Expand All @@ -50,6 +51,7 @@ describe(["@tier3"], "Tests related to application assessment and review", () =>
login();
cy.intercept("GET", "/hub/application*").as("getApplication");

AssessmentQuestionnaire.deleteAllQuestionnaires();
AssessmentQuestionnaire.enable(fileName);
stakeholderList = createMultipleStakeholders(1);

Expand Down Expand Up @@ -157,9 +159,41 @@ describe(["@tier3"], "Tests related to application assessment and review", () =>
// AssessmentQuestionnaire.delete(cloudNative);
});

it("Assess and review application associated with unassessed/unreviewed archetypes", function () {
// Polarion TC MTA-456
const tags = createMultipleTags(2);
const archetypeList = createMultipleArchetypes(2, tags);

AssessmentQuestionnaire.deleteAllQuestionnaires();
AssessmentQuestionnaire.enable(legacyPathfinder);

const appdata = {
name: data.getAppName(),
tags: [tags[0].name, tags[1].name],
};
const application2 = new Application(appdata);
application2.create();
cy.wait(2 * SEC);

application2.perform_assessment("medium", stakeholderList);
cy.wait(2 * SEC);
application2.verifyStatus("assessment", "Completed");
application2.validateAssessmentField("Medium");

application2.perform_review("medium");
cy.wait(2 * SEC);
application2.verifyStatus("review", "Completed");
application2.validateReviewFields();

application2.delete();
cy.wait(2 * SEC);
deleteByList(archetypeList);
deleteByList(tags);
});

after("Perform test data clean up", function () {
deleteByList(stakeholderList);
deleteByList(applicationList);
AssessmentQuestionnaire.delete(cloudNative);
AssessmentQuestionnaire.deleteAllQuestionnaires();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ let tags: Tag[];
describe(["@tier1"], "Archetype assessment and review tests", () => {
before("Login and Create Test Data", function () {
login();
AssessmentQuestionnaire.deleteAllQuesionnaire();
AssessmentQuestionnaire.deleteAllQuestionnaires();
AssessmentQuestionnaire.enable(legacyPathfinder);

stakeholders = createMultipleStakeholders(1);
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/tests/migration/reports-tab/filter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe(["@tier2"], "Reports Tab filter validations", function () {
login();
deleteAllMigrationWaves();
deleteApplicationTableRows();
AssessmentQuestionnaire.deleteAllQuesionnaire();
AssessmentQuestionnaire.deleteAllQuestionnaires();
AssessmentQuestionnaire.import("questionnaire_import/cloud-native.yaml");
AssessmentQuestionnaire.enable(cloudNative);
AssessmentQuestionnaire.enable(legacyPathfinder);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe(["@tier2"], "Reports tests", () => {
login();
deleteAllMigrationWaves();
deleteApplicationTableRows();
AssessmentQuestionnaire.deleteAllQuesionnaire();
AssessmentQuestionnaire.deleteAllQuestionnaires();
AssessmentQuestionnaire.enable(legacyPathfinder);
stakeholdersList = createMultipleStakeholders(1);
applicationsList = createMultipleApplications(4);
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/tests/migration/reports-tab/reports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ let riskType = ["low", "medium", "high", "low", "high", "high"];
describe(["@tier2"], "Reports tests", () => {
before("Login and Create Test Data", function () {
login();
AssessmentQuestionnaire.deleteAllQuesionnaire();
AssessmentQuestionnaire.deleteAllQuestionnaires();
AssessmentQuestionnaire.enable(legacyPathfinder);
deleteAllMigrationWaves();
deleteApplicationTableRows();
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/tests/migration/reports-tab/sort.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe(["@tier2"], "Reports tests", () => {
login();
deleteAllMigrationWaves();
deleteApplicationTableRows();
AssessmentQuestionnaire.deleteAllQuesionnaire();
AssessmentQuestionnaire.deleteAllQuestionnaires();
AssessmentQuestionnaire.enable(legacyPathfinder);
stakeholder = createMultipleStakeholders(1)[0];
application = createMultipleApplications(1)[0];
Expand Down

0 comments on commit 2a73e89

Please sign in to comment.