From 386db473a12a494139e5d422f62c1069e245bd1a Mon Sep 17 00:00:00 2001 From: Ashraf Mohammed Date: Sun, 18 Feb 2024 02:47:26 +0530 Subject: [PATCH] add cy wait --- cypress/e2e/patient_spec/patient_detailpage.cy.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cypress/e2e/patient_spec/patient_detailpage.cy.ts b/cypress/e2e/patient_spec/patient_detailpage.cy.ts index a82526c6bed..3f43df2816a 100644 --- a/cypress/e2e/patient_spec/patient_detailpage.cy.ts +++ b/cypress/e2e/patient_spec/patient_detailpage.cy.ts @@ -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(); @@ -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(); @@ -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(); @@ -99,7 +100,7 @@ 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(); @@ -107,7 +108,7 @@ describe("Patient Details", () => { 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(); @@ -115,7 +116,7 @@ describe("Patient Details", () => { 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();