Skip to content

Commit

Permalink
[RFR] Expand interop and tier0 tests (#956)
Browse files Browse the repository at this point in the history
* Expand interop tests

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

* Add tier0 tag for application and archetype assessment/review test

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

---------

Signed-off-by: Nandini Chandra <[email protected]>
  • Loading branch information
nachandr authored Feb 8, 2024
1 parent 6de1bf4 commit 2c53539
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe(["@tier1"], "Application assessment and review tests", () => {
cy.wait(2 * SEC);
});

it(["@interop"], "Application assessment and review with medium risk", function () {
it("Application assessment and review with medium risk", function () {
const application = new Application(getRandomApplicationData());
application.create();
cy.wait("@getApplication");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,54 +183,58 @@ describe(["@tier3"], "Tests related to application assessment and review", () =>
// AssessmentQuestionnaire.delete(cloudNative);
});

it("Test inheritance after discarding application assessment and review", function () {
// Polarion TC MTA-456 Assess and review application associated with unassessed/unreviewed archetypes
const tags = createMultipleTags(2);
const archetypes = 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();

// Polarion TC 496 Verify assessment and review inheritance after discarding application assessment and review
archetypes[0].perform_review("low");
application2.validateReviewFields(); // Application should retain its individual review.

archetypes[0].perform_assessment("low", stakeholderList);
application2.validateAssessmentField("Medium"); // Application should retain its individual assessment.

archetypes[1].delete(); // Disassociate app from archetypes[1].name

// Inheritance happens only after application assessment/review is discarded.
application2.selectKebabMenuItem("Discard review");
application2.validateInheritedReviewFields([archetypes[0].name]);

application2.selectKebabMenuItem("Discard assessment");
application2.validateAssessmentField("Low");
application2.verifyStatus("assessment", "Completed");

application2.delete();
cy.wait(2 * SEC);
archetypes[0].delete();
deleteByList(tags);
});
it(
["@interop", "@tier0"],
"Test inheritance after discarding application assessment and review",
function () {
// Polarion TC MTA-456 Assess and review application associated with unassessed/unreviewed archetypes
const tags = createMultipleTags(2);
const archetypes = 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();

// Polarion TC 496 Verify assessment and review inheritance after discarding application assessment and review
archetypes[0].perform_review("low");
application2.validateReviewFields(); // Application should retain its individual review.

archetypes[0].perform_assessment("low", stakeholderList);
application2.validateAssessmentField("Medium"); // Application should retain its individual assessment.

archetypes[1].delete(); // Disassociate app from archetypes[1].name

// Inheritance happens only after application assessment/review is discarded.
application2.selectKebabMenuItem("Discard review");
application2.validateInheritedReviewFields([archetypes[0].name]);

application2.selectKebabMenuItem("Discard assessment");
application2.validateAssessmentField("Low");
application2.verifyStatus("assessment", "Completed");

application2.delete();
cy.wait(2 * SEC);
archetypes[0].delete();
deleteByList(tags);
}
);

it("Test application association when an archetype contains a subset of the tags of another archetype", function () {
// Automates Polarion TC MTA-501
Expand Down

0 comments on commit 2c53539

Please sign in to comment.