Skip to content

Commit

Permalink
fixed the failing skipped tests (#680)
Browse files Browse the repository at this point in the history
Co-authored-by: Dennis Kigen <[email protected]>
  • Loading branch information
ayush-AI and denniskigen authored Jul 4, 2023
1 parent 0e35687 commit 763c5b5
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Formik, Form } from 'formik';
import { initialFormValues } from '../../patient-registration.component';
import { DeathInfoSection } from './death-info-section.component';
import { FormValues } from '../../patient-registration-types';
import { PatientRegistrationContext } from '../../patient-registration-context';

jest.mock('@openmrs/esm-framework', () => {
const originalModule = jest.requireActual('@openmrs/esm-framework');
Expand All @@ -15,16 +16,18 @@ jest.mock('@openmrs/esm-framework', () => {
});

// TODO: Implement feature and get tests to pass
describe.skip('death info section', () => {
describe('death info section', () => {
const formValues: FormValues = initialFormValues;

const setupSection = async (isDead?: boolean) => {
render(
<Formik initialValues={{ ...initialFormValues, isDead }} onSubmit={null}>
<Form>
<DeathInfoSection />
</Form>
</Formik>,
<PatientRegistrationContext.Provider value={{ values: { isDead: isDead || false } }}>
<Formik initialValues={{ ...initialFormValues, isDead }} onSubmit={null}>
<Form>
<DeathInfoSection />
</Form>
</Formik>
</PatientRegistrationContext.Provider>,
);
const allInputs = screen.queryAllByLabelText(
(content, element) => element.tagName.toLowerCase() === 'input',
Expand Down

0 comments on commit 763c5b5

Please sign in to comment.