Skip to content

Commit

Permalink
Modified Cypress test to include bed number selection in consultation…
Browse files Browse the repository at this point in the history
… test (ohcnetwork#8383)

* added bed number selection to the consultation test

* fix the lint error

* revert vite

* revert vite
  • Loading branch information
nihal467 authored Aug 21, 2024
1 parent 07109a8 commit 42c684a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions cypress/e2e/patient_spec/patient_consultation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ describe("Patient Consultation in multiple combination", () => {
cy.submitButton("Create Consultation");
// the above submit should fail as IP number is missing
patientConsultationPage.typePatientNumber(patientIpNumber);
patientConsultationPage.selectBed("Dummy Bed 1");
cy.submitButton("Create Consultation");
cy.verifyNotification("Consultation created successfully");
// Below code for the prescription module only present while creating a new consultation
Expand Down
4 changes: 4 additions & 0 deletions cypress/pageobject/Patient/PatientConsultation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ export class PatientConsultationPage {
cy.searchAndSelectOption("#referred_to", referance);
}

selectBed(bedNo: string) {
cy.searchAndSelectOption("#bed", bedNo);
}

selectPatientWard(ward: string) {
cy.searchAndSelectOption("#transferred_from_location", ward);
}
Expand Down
1 change: 1 addition & 0 deletions src/Components/Common/BedSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export const BedSelect = (props: BedSelectProps) => {

return (
<AutoCompleteAsync
id={name}
name={name}
multiple={multiple}
selected={selected}
Expand Down

0 comments on commit 42c684a

Please sign in to comment.