Skip to content

Commit

Permalink
implement wait until
Browse files Browse the repository at this point in the history
  • Loading branch information
nihal467 committed Sep 23, 2024
1 parent 7c288dc commit 70f5ea7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions cypress/e2e/facility_spec/FacilityHomepage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,13 @@ describe("Facility Homepage Function", () => {
facilityHome.csvDownloadIntercept(doctorsAlias, "&doctors");
facilityHome.clickExportButton();
facilityHome.clickMenuItem("Doctors");
facilityHome.verifyDownload(doctorsAlias);
facilityHome.clickSearchButton();
// Download the Triages CSV
facilityHome.csvDownloadIntercept(triagesAlias, "&triage");
facilityHome.clickExportButton();
facilityHome.clickMenuItem("Triages");
facilityHome.verifyDownload(triagesAlias);
facilityHome.clickSearchButton();
});

Expand Down
5 changes: 3 additions & 2 deletions cypress/pageobject/Facility/FacilityHome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ class FacilityHome {
}

verifyDownload(alias: string) {
cy.wait(`@${alias}`).its("response.statusCode").should("eq", 200);
cy.wait(5000);
cy.wait(`@${alias}`, { timeout: 60000 })
.its("response.statusCode")
.should("eq", 200);
}

getURL() {
Expand Down

0 comments on commit 70f5ea7

Please sign in to comment.