Skip to content

Commit

Permalink
modify cypress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rash-27 committed Mar 20, 2024
1 parent 8768cbf commit 49f3f1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions cypress/e2e/patient_spec/patient_registration.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ describe("Patient Creation with consultation", () => {
const phone_number = generatePhoneNumber();
const emergency_phone_number = generateEmergencyPhoneNumber();
const age = calculateAge();
const patientage = "20";
const yearOfBirthfromAge = new Date().getFullYear() - parseInt(patientage);
const patientFacility = "Dummy Facility 40";
const patientDateOfBirth = "01012001";
const patientOneName = "Patient With No Consultation";
Expand Down
5 changes: 2 additions & 3 deletions cypress/pageobject/Patient/PatientCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ export class PatientPage {
cy.get("#date-input").click().type(dateOfBirth);
}
typePatientAge(age: string) {
cy.get("#age-input-type-selector").click();
cy.get("#age-input-type-selector").contains("Age").click();
cy.get("button").contains("Confirm").click();
cy.clickAndSelectOption("#age-input-type-selector", "Age");
cy.submitButton("Confirm");
cy.get("#age-div").click().type(age);
}

Expand Down

0 comments on commit 49f3f1e

Please sign in to comment.