Skip to content

Commit

Permalink
Merge branch 'develop' into issue/9189/edit-assetcreate
Browse files Browse the repository at this point in the history
  • Loading branch information
rajku-dev authored Dec 20, 2024
2 parents 28affcc + 949624f commit 144a934
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
3 changes: 1 addition & 2 deletions cypress/e2e/patient_spec/PatientConsultationDischarge.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ describe("Patient Discharge based on multiple reason", () => {
});

beforeEach(() => {
cy.viewport(1280, 720);
cy.restoreLocalStorage();
cy.clearLocalStorage(/filters--.+/);
cy.awaitUrl("/patients");
Expand Down Expand Up @@ -116,8 +117,6 @@ describe("Patient Discharge based on multiple reason", () => {
patientDischarge.interceptDischargePatient();
cy.clickSubmitButton("Acknowledge & Submit");
patientDischarge.verifyDischargePatient();
cy.verifyNotification("Patient Discharged Successfully");
cy.closeNotification();
// Verify the consultation dashboard reflection
cy.verifyContentPresence("#consultation-buttons", ["Recovered"]);
// Verify the dashboard and discharge information
Expand Down
7 changes: 1 addition & 6 deletions cypress/pageobject/Patient/PatientConsultation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,7 @@ export class PatientConsultationPage {
}

clickEditConsultationButton() {
cy.get("#consultation-buttons").scrollIntoView();
cy.get("button").contains("Manage Patient").click();
cy.verifyAndClickElement(
"#consultation-buttons",
"Edit Consultation Details",
);
cy.clickAndSelectOption("#show-more", "Edit Consultation Details", true);
}

interceptConsultation() {
Expand Down
4 changes: 2 additions & 2 deletions cypress/pageobject/Patient/PatientCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export class PatientPage {
cy.intercept("GET", "**/api/v1/consultation/**").as("getPatient");
cy.get("#patient-name-list").contains(patientName).click();
cy.wait("@getPatient").its("response.statusCode").should("eq", 200);
cy.get("#patient-name-consultation")
.should("be.visible")
cy.get("#patient-name-consultation", { timeout: 15000 })
.should("not.have.class", "hidden")
.contains(patientName);
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/Patient/PatientInfoCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ export default function PatientInfoCard(props: PatientInfoCardProps) {
].map(
(action: any, i) =>
action[3] && (
<div key={i}>
<div key={i} role="option">
<Link
key={i}
className="dropdown-item-primary pointer-events-auto m-2 flex cursor-pointer items-center justify-start gap-2 rounded border-0 p-2 text-sm font-normal transition-all duration-200 ease-in-out"
Expand Down
6 changes: 4 additions & 2 deletions src/components/Users/UserAddEditForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ const UserAddEditForm = (props: UserProps) => {
...fieldMappings,
user_type: formData.user_type,
password: formData.password,
facilities: formData.facilities ? formData.facilities : undefined,
facilities: formData.facilities ?? undefined,
home_facility: formData.home_facility ?? undefined,
username: formData.username,
state: formData.state,
Expand Down Expand Up @@ -1265,7 +1265,9 @@ const UserAddEditForm = (props: UserProps) => {
defaults={userData ? state.form : initForm}
validate={validateForm}
onCancel={editUser ? handleCancel : () => goBack()}
onSubmit={editUser ? handleEditSubmit : handleSubmit}
onSubmit={() =>
editUser ? handleEditSubmit(state.form) : handleSubmit(state.form)
}
onDraftRestore={(newState) => {
dispatch({ type: "set_state", state: newState });
}}
Expand Down

0 comments on commit 144a934

Please sign in to comment.