Skip to content

Commit

Permalink
Fix Reports links validation test (#1205)
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Brugarolas <[email protected]>
  • Loading branch information
abrugaro authored Aug 28, 2024
1 parent e7ec17b commit f27de74
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cypress/e2e/tests/migration/reports-tab/links-validation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe(["@tier2"], "Reports tab links validation tests", () => {
AssessmentQuestionnaire.deleteAllQuestionnaires();
AssessmentQuestionnaire.enable(legacyPathfinder);
stakeholdersList = createMultipleStakeholders(1);
applicationsList = createMultipleApplications(4);
applicationsList = createMultipleApplications(5);

for (let i = 0; i < riskType.length; i++) {
applicationsList[i].perform_assessment(riskType[i], stakeholdersList);
Expand All @@ -58,9 +58,11 @@ describe(["@tier2"], "Reports tab links validation tests", () => {
it("Risk links validation", function () {
riskType.forEach((risk, i) => {
Reports.open();
if (risk === "unknown")
cy.contains("a", `${risk}`, { matchCase: false, timeout: 10 * SEC }).click();
else cy.contains("a", `${risk} risk`, { matchCase: false, timeout: 10 * SEC }).click();
if (risk === "unknown") {
cy.contains("a", `${risk}`, { matchCase: false, timeout: 5 * SEC }).click();
} else {
cy.contains("a", `${risk} risk`, { matchCase: false, timeout: 5 * SEC }).click();
}
cy.wrap(getTableColumnData(name)).then((appNames) =>
expect(appNames, `${risk} risk link validation`).to.be.deep.equal([
applicationsList[i].name,
Expand Down

0 comments on commit f27de74

Please sign in to comment.