Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified Cypress test to include bed number selection in consultation test #8383

Merged
merged 5 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading