Skip to content

Commit

Permalink
add cy wait
Browse files Browse the repository at this point in the history
  • Loading branch information
AshrafMd-1 committed Feb 17, 2024
1 parent 4df976e commit 386db47
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions cypress/e2e/patient_spec/patient_detailpage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe("Patient Details", () => {
);
});

it("Archive file", () => {
it("Archive file and verify it", () => {
patientPage.visitPatient("Dummy Patient 4");
patientFileUploadPage.visitPatientDetailsPage();
patientFileUploadPage.archiveFile();
Expand All @@ -62,7 +62,7 @@ describe("Patient Details", () => {
patientFileUploadPage.verifyArchiveFile();
});

it("Verify the uploaded file be edited by author", () => {
it("Verify the uploaded file can be edited by author", () => {
loginPage.login("dummynurse1", "Coronasafe@123");
patientPage.visitPatient("Dummy Patient 5");
patientFileUploadPage.visitPatientDetailsPage();
Expand All @@ -78,14 +78,15 @@ describe("Patient Details", () => {
);
});

it("Verify the uploaded file be cannot edited by other users below district admin", () => {
it("Verify the uploaded file cannot be edited by other users below district admin", () => {
loginPage.login("dummynurse2", "Coronasafe@123");
patientPage.visitPatient("Dummy Patient 5");
patientFileUploadPage.visitPatientDetailsPage();
cy.wait(2000);
patientFileUploadPage.verifyFileEditOption(false);
});

it("Verify the uploaded file be can edited by district admin and above", () => {
it("Verify the uploaded file can be edited by district admin and above", () => {
loginPage.loginAsDisctrictAdmin();
patientPage.visitPatient("Dummy Patient 5");
patientFileUploadPage.visitPatientDetailsPage();
Expand All @@ -99,23 +100,23 @@ describe("Patient Details", () => {
);
});

it("Verify that file download is possible for author.", () => {
it("Verify that file download is possible for author", () => {
loginPage.login("dummynurse1", "Coronasafe@123");
patientPage.visitPatient("Dummy Patient 5");
patientFileUploadPage.visitPatientDetailsPage();
patientFileUploadPage.verifyFileDownloadOption(true);
patientFileUploadPage.downloadFile();
});

it("Verify that file download is possible for users below district admin.", () => {
it("Verify that file download is possible for users below district admin", () => {
loginPage.login("dummynurse2", "Coronasafe@123");
patientPage.visitPatient("Dummy Patient 5");
patientFileUploadPage.visitPatientDetailsPage();
patientFileUploadPage.verifyFileDownloadOption(true);
patientFileUploadPage.downloadFile();
});

it("Verify that file download is possible for district admin and above.", () => {
it("Verify that file download is possible for district admin and above", () => {
loginPage.loginAsDisctrictAdmin();
patientPage.visitPatient("Dummy Patient 5");
patientFileUploadPage.visitPatientDetailsPage();
Expand Down

0 comments on commit 386db47

Please sign in to comment.