diff --git a/src/__tests__/patients/care-plans/AddCarePlanModal.test.tsx b/src/__tests__/patients/care-plans/AddCarePlanModal.test.tsx index e62b486275..340fdbcb60 100644 --- a/src/__tests__/patients/care-plans/AddCarePlanModal.test.tsx +++ b/src/__tests__/patients/care-plans/AddCarePlanModal.test.tsx @@ -9,6 +9,7 @@ import { Router } from 'react-router-dom' import createMockStore from 'redux-mock-store' import thunk from 'redux-thunk' +import PatientRepository from '../../../clients/db/PatientRepository' import { CarePlanIntent, CarePlanStatus } from '../../../model/CarePlan' import Patient from '../../../model/Patient' import AddCarePlanModal from '../../../patients/care-plans/AddCarePlanModal' @@ -42,6 +43,8 @@ describe('Add Care Plan Modal', () => { const onCloseSpy = jest.fn() const setup = () => { + jest.spyOn(PatientRepository, 'find').mockResolvedValue(patient) + jest.spyOn(PatientRepository, 'saveOrUpdate') const store = mockStore({ patient: { patient, carePlanError } } as any) const history = createMemoryHistory() const wrapper = mount( diff --git a/src/__tests__/patients/care-plans/CarePlanForm.test.tsx b/src/__tests__/patients/care-plans/CarePlanForm.test.tsx index 20f83dd4c8..d5441b4a36 100644 --- a/src/__tests__/patients/care-plans/CarePlanForm.test.tsx +++ b/src/__tests__/patients/care-plans/CarePlanForm.test.tsx @@ -226,7 +226,6 @@ describe('Care Plan Form', () => { const noteInput = wrapper.findWhere((w) => w.prop('name') === 'note') expect(noteInput).toHaveLength(1) expect(noteInput.prop('patient.carePlan.note')) - expect(noteInput.prop('isRequired')).toBeTruthy() expect(noteInput.prop('value')).toEqual(carePlan.note) }) diff --git a/src/__tests__/patients/patient-slice.test.ts b/src/__tests__/patients/patient-slice.test.ts index 829fb43d56..53a7c2da5d 100644 --- a/src/__tests__/patients/patient-slice.test.ts +++ b/src/__tests__/patients/patient-slice.test.ts @@ -699,7 +699,6 @@ describe('patients slice', () => { startDate: 'patient.carePlan.error.startDateRequired', endDate: 'patient.carePlan.error.endDateRequired', condition: 'patient.carePlan.error.conditionRequired', - note: 'patient.carePlan.error.noteRequired', } const store = mockStore() const expectedCarePlan = {} as CarePlan diff --git a/src/patients/care-plans/CarePlanForm.tsx b/src/patients/care-plans/CarePlanForm.tsx index 0845250a40..6a5a24e7d9 100644 --- a/src/patients/care-plans/CarePlanForm.tsx +++ b/src/patients/care-plans/CarePlanForm.tsx @@ -145,7 +145,6 @@ const CarePlanForm = (props: Props) => {