From e0bf0245e411cc0a4d485555903039a977cf5e88 Mon Sep 17 00:00:00 2001 From: Brian Jang <58790456+BrianMaki@users.noreply.github.com> Date: Thu, 21 Nov 2024 11:27:20 -0800 Subject: [PATCH] Fix HG Dependent failures for AB#16865 (#6372) * Ensure buttons are visible before clicking for AB#16865. * Ensure buttons are visible before clicking for AB#16865. * Removed unused variables in tests for AB#16865. * Adjust parallelism for functional tests for AB#16865. * Adjust parallelism for functional tests for AB#16865. --- .../integration/e2e/delegation-read.cy.js | 4 -- .../integration/e2e/delegation-write.cy.js | 2 - .../e2e/feedback-review-read.cy.js | 2 - .../e2e/patient-details-write.cy.js | 1 - .../integration/e2e/user/dependents.js | 46 +++++++++++++------ .../Pipelines/pipelines/FunctionalTests.yaml | 4 +- 6 files changed, 35 insertions(+), 24 deletions(-) diff --git a/Apps/Admin/Tests/Functional/cypress/integration/e2e/delegation-read.cy.js b/Apps/Admin/Tests/Functional/cypress/integration/e2e/delegation-read.cy.js index f1d04b9f0f..d173d31c0a 100644 --- a/Apps/Admin/Tests/Functional/cypress/integration/e2e/delegation-read.cy.js +++ b/Apps/Admin/Tests/Functional/cypress/integration/e2e/delegation-read.cy.js @@ -2,10 +2,6 @@ const dependentWithAudit = "9872868128"; // Leroy Desmond Tobias const dependentWithoutGuardian = { phn: "9874307168" }; const dependentWithGuardian = { phn: "9874307175", guardianPhn: "9735353315" }; const dependentExceedingAgeCutoff = { phn: "9735353315" }; -const dependentToProtect = "9872868095"; // Jeffrey Lawrence Stallings -const guardianToAdd = "9735352488"; // Turpentine Garlandry -const guardianNotFound = "9735352489"; -const guardianAlreadyAdded = "9735353315"; // BONNET PROTERVITY const defaultTimeout = 60000; function performSearch(phn) { diff --git a/Apps/Admin/Tests/Functional/cypress/integration/e2e/delegation-write.cy.js b/Apps/Admin/Tests/Functional/cypress/integration/e2e/delegation-write.cy.js index 26e489299c..75d690f547 100644 --- a/Apps/Admin/Tests/Functional/cypress/integration/e2e/delegation-write.cy.js +++ b/Apps/Admin/Tests/Functional/cypress/integration/e2e/delegation-write.cy.js @@ -1,7 +1,5 @@ const dependentWithAudit = "9872868128"; // Leroy Desmond Tobias -const dependentWithoutGuardian = { phn: "9874307168" }; const dependentWithGuardian = { phn: "9874307175", guardianPhn: "9735353315" }; -const dependentExceedingAgeCutoff = { phn: "9735353315" }; const dependentToProtect = "9872868095"; // Jeffrey Lawrence Stallings const guardianToAdd = "9735352488"; // Turpentine Garlandry const guardianNotFound = "9735352489"; diff --git a/Apps/Admin/Tests/Functional/cypress/integration/e2e/feedback-review-read.cy.js b/Apps/Admin/Tests/Functional/cypress/integration/e2e/feedback-review-read.cy.js index 57a3a9537a..c887a0d705 100644 --- a/Apps/Admin/Tests/Functional/cypress/integration/e2e/feedback-review-read.cy.js +++ b/Apps/Admin/Tests/Functional/cypress/integration/e2e/feedback-review-read.cy.js @@ -1,5 +1,3 @@ -const suggestionTag = "suggestion"; -const questionTag = "question"; const defaultTimeout = 60000; const rowSelector = "[data-testid=feedback-table] tbody tr.mud-table-row"; diff --git a/Apps/Admin/Tests/Functional/cypress/integration/e2e/patient-details-write.cy.js b/Apps/Admin/Tests/Functional/cypress/integration/e2e/patient-details-write.cy.js index 9f2f9aaca8..d881be8356 100644 --- a/Apps/Admin/Tests/Functional/cypress/integration/e2e/patient-details-write.cy.js +++ b/Apps/Admin/Tests/Functional/cypress/integration/e2e/patient-details-write.cy.js @@ -2,7 +2,6 @@ import { performSearch as search } from "../../utilities/supportUtilities"; import { getTableRows, selectTab } from "../../utilities/sharedUtilities"; const hdid = "P6FFO433A5WPMVTGM7T4ZVWBKCSVNAYGTWTU3J2LWMGUMERKI72A"; -const phnWithInvalidDoses = "9735352535"; const switchName = "Immunization"; const auditBlockReason = "Test block reason"; const auditUnblockReason = "Test unblock reason"; diff --git a/Testing/functional/tests/cypress/integration/e2e/user/dependents.js b/Testing/functional/tests/cypress/integration/e2e/user/dependents.js index 5c69c64bee..e89fead207 100644 --- a/Testing/functional/tests/cypress/integration/e2e/user/dependents.js +++ b/Testing/functional/tests/cypress/integration/e2e/user/dependents.js @@ -351,12 +351,16 @@ describe("dependents", () => { // Click download dropdown under History tab cy.get( `[data-testid=download-immunization-history-report-btn-${validDependentHdid}]` - ).click(); + ) + .should("be.visible", "be.enabled") + .click(); // Click PDF cy.get( `[data-testid=download-immunization-history-report-pdf-btn-${validDependentHdid}]` - ).click(); + ) + .should("be.visible", "be.enabled") + .click(); // Confirmation modal cy.get("[data-testid=generic-message-modal]").should("be.visible"); @@ -370,12 +374,16 @@ describe("dependents", () => { // Click download dropdown under History tab cy.get( `[data-testid=download-immunization-history-report-btn-${validDependentHdid}]` - ).click(); + ) + .should("be.visible", "be.enabled") + .click(); // Click CSV cy.get( `[data-testid=download-immunization-history-report-csv-btn-${validDependentHdid}]` - ).click(); + ) + .should("be.visible", "be.enabled") + .click(); // Confirmation modal cy.get("[data-testid=generic-message-modal]").should("be.visible"); @@ -389,12 +397,16 @@ describe("dependents", () => { // Click download dropdown under History tab cy.get( `[data-testid=download-immunization-history-report-btn-${validDependentHdid}]` - ).click(); + ) + .should("be.visible", "be.enabled") + .click(); // Click XLSX cy.get( `[data-testid=download-immunization-history-report-xlsx-btn-${validDependentHdid}]` - ).click(); + ) + .should("be.visible", "be.enabled") + .click(); // Confirmation modal cy.get("[data-testid=generic-message-modal]").should("be.visible"); @@ -435,12 +447,16 @@ describe("dependents", () => { // Click download dropdown under Forecasts tab cy.get( `[data-testid=download-immunization-forecast-report-btn-${validDependentHdid}]` - ).click({ force: true }); + ) + .should("be.visible", "be.enabled") + .click(); // Click PDF cy.get( `[data-testid=download-immunization-forecast-report-pdf-btn-${validDependentHdid}]` - ).click({ force: true }); + ) + .should("be.visible", "be.enabled") + .click({ force: true }); // Confirmation modal cy.get("[data-testid=generic-message-modal]").should("be.visible"); @@ -455,13 +471,15 @@ describe("dependents", () => { cy.get( `[data-testid=download-immunization-forecast-report-btn-${validDependentHdid}` ) - .should("be.enabled") - .click({ force: true }); + .should("be.visible", "be.enabled") + .click(); // Click CSV cy.get( `[data-testid=download-immunization-forecast-report-csv-btn-${validDependentHdid}]` - ).click({ force: true }); + ) + .should("be.visible") + .click({ force: true }); // Confirmation modal cy.get("[data-testid=generic-message-modal]").should("be.visible"); @@ -476,13 +494,15 @@ describe("dependents", () => { cy.get( `[data-testid=download-immunization-forecast-report-btn-${validDependentHdid}]` ) - .should("be.enabled") + .should("be.visible", "be.enabled") .click({ force: true }); // Click XLSX cy.get( `[data-testid=download-immunization-forecast-report-xlsx-btn-${validDependentHdid}]` - ).click({ force: true }); + ) + .should("be.visible") + .click({ force: true }); // Confirmation modal cy.get("[data-testid=generic-message-modal]").should("be.visible"); diff --git a/Tools/Pipelines/pipelines/FunctionalTests.yaml b/Tools/Pipelines/pipelines/FunctionalTests.yaml index 5ed8a8adb9..e1ca98c9e4 100644 --- a/Tools/Pipelines/pipelines/FunctionalTests.yaml +++ b/Tools/Pipelines/pipelines/FunctionalTests.yaml @@ -95,7 +95,7 @@ jobs: - "Admin_Seed" - "Admin_Authentication_Tests" strategy: - parallel: 5 + parallel: 3 timeoutInMinutes: 15 steps: - task: Bash@3 @@ -120,7 +120,7 @@ jobs: - "Admin_Seed" - "Admin_Read_Tests" strategy: - parallel: 5 + parallel: 3 timeoutInMinutes: 15 steps: - task: Bash@3