From ed7243e9033f2d8cc8a7accbd18ea94347b214dc Mon Sep 17 00:00:00 2001 From: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> Date: Thu, 16 Jan 2025 14:04:06 +0530 Subject: [PATCH] switch to use develop backend (#10007) --- .github/workflows/cypress.yaml | 4 ++-- cypress/e2e/patient_spec/patient_creation.cy.ts | 4 ++-- cypress/e2e/users_spec/user_creation.cy.ts | 1 + cypress/fixtures/users.json | 6 +++--- cypress/pageObject/Users/UserCreation.ts | 5 +++-- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cypress.yaml b/.github/workflows/cypress.yaml index d259f9e83c3..9ee2c7b92ff 100644 --- a/.github/workflows/cypress.yaml +++ b/.github/workflows/cypress.yaml @@ -17,7 +17,7 @@ jobs: matrix: containers: [1] env: - REACT_CARE_API_URL: https://care-api.do.ohc.network + REACT_CARE_API_URL: https://careapi.ohc.network steps: - name: Checkout 📥 @@ -88,4 +88,4 @@ jobs: if: ${{ failure() && steps.pr_origin.outputs.is_forked == 'true' }} with: name: cypress-videos - path: cypress/videos \ No newline at end of file + path: cypress/videos diff --git a/cypress/e2e/patient_spec/patient_creation.cy.ts b/cypress/e2e/patient_spec/patient_creation.cy.ts index 0fc9c6b9c1c..a2a1a66a172 100644 --- a/cypress/e2e/patient_spec/patient_creation.cy.ts +++ b/cypress/e2e/patient_spec/patient_creation.cy.ts @@ -42,7 +42,7 @@ describe("Patient Management", () => { it("create a new patient and verify details", () => { cy.loginByApi("doctor"); - facilityCreation.selectFacility("Arike"); + facilityCreation.selectFacility("GHC Trikaripur"); patientCreation .clickSearchPatients() .clickCreateNewPatient() @@ -67,7 +67,7 @@ describe("Patient Management", () => { it("search patient with phone number and verifies details", () => { cy.loginByApi("staff"); - facilityCreation.selectFacility("Arike"); + facilityCreation.selectFacility("GHC Trikaripur"); patientCreation .clickSearchPatients() .searchPatient(TEST_PHONE) diff --git a/cypress/e2e/users_spec/user_creation.cy.ts b/cypress/e2e/users_spec/user_creation.cy.ts index 6f4edee811c..62a4bd53601 100644 --- a/cypress/e2e/users_spec/user_creation.cy.ts +++ b/cypress/e2e/users_spec/user_creation.cy.ts @@ -43,6 +43,7 @@ describe("User Creation", () => { userCreation .navigateToUsersTab() .clickAddUserButton() + .fillEmail(testUserData.email) .submitUserForm() .verifyValidationErrors() .fillUserDetails(testUserData) diff --git a/cypress/fixtures/users.json b/cypress/fixtures/users.json index b6c15b034c2..ca4ee7bc97b 100644 --- a/cypress/fixtures/users.json +++ b/cypress/fixtures/users.json @@ -1,7 +1,7 @@ { "admin": { - "username": "admin", - "password": "Lilo@123" + "username": "devsuperadmin", + "password": "Test@123" }, "nurse": { "username": "nihal-nurse", @@ -12,7 +12,7 @@ "password": "Test@123" }, "staff": { - "username": "nihal-staff", + "username": "nihalstaff", "password": "Test@123" } } diff --git a/cypress/pageObject/Users/UserCreation.ts b/cypress/pageObject/Users/UserCreation.ts index 0ee7e3b95d4..181ad9d0649 100644 --- a/cypress/pageObject/Users/UserCreation.ts +++ b/cypress/pageObject/Users/UserCreation.ts @@ -50,7 +50,9 @@ export class UserCreation { } fillEmail(email: string) { - cy.typeIntoField('[data-cy="email-input"]', email); + cy.typeIntoField('[data-cy="email-input"]', email, { + clearBeforeTyping: true, + }); return this; } @@ -68,7 +70,6 @@ export class UserCreation { { label: "Username", message: "Required" }, { label: "Password", message: "Required" }, { label: "Confirm Password", message: "Required" }, - { label: "Email", message: "Required" }, { label: "Phone Number", message: "Phone number must start with +91 followed by 10 digits",