Skip to content

Commit

Permalink
Merge branch 'develop' into issue/9733/user-create-edit
Browse files Browse the repository at this point in the history
  • Loading branch information
nihal467 authored Jan 16, 2025
2 parents 150f8aa + ed7243e commit 2ebbcec
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cypress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 📥
Expand Down Expand Up @@ -88,4 +88,4 @@ jobs:
if: ${{ failure() && steps.pr_origin.outputs.is_forked == 'true' }}
with:
name: cypress-videos
path: cypress/videos
path: cypress/videos
4 changes: 2 additions & 2 deletions cypress/e2e/patient_spec/patient_creation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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)
Expand Down
1 change: 1 addition & 0 deletions cypress/e2e/users_spec/user_creation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ describe("User Creation", () => {
userCreation
.navigateToUsersTab()
.clickAddUserButton()
.fillEmail(testUserData.email)
.submitUserForm()
.verifyValidationErrors()
.fillUserDetails(testUserData)
Expand Down
6 changes: 3 additions & 3 deletions cypress/fixtures/users.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"admin": {
"username": "admin",
"password": "Lilo@123"
"username": "devsuperadmin",
"password": "Test@123"
},
"nurse": {
"username": "nihal-nurse",
Expand All @@ -12,7 +12,7 @@
"password": "Test@123"
},
"staff": {
"username": "nihal-staff",
"username": "nihalstaff",
"password": "Test@123"
}
}
5 changes: 3 additions & 2 deletions cypress/pageObject/Users/UserCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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",
Expand Down

0 comments on commit 2ebbcec

Please sign in to comment.