diff --git a/src/components/AllergyForm/AllergyForm.test.tsx b/src/components/AllergyForm/AllergyForm.test.tsx index 10b2b8f..026bf3e 100644 --- a/src/components/AllergyForm/AllergyForm.test.tsx +++ b/src/components/AllergyForm/AllergyForm.test.tsx @@ -26,9 +26,21 @@ describe('AllergyForm', () => { ] render() + const allergyTypeSelector = screen.getByText('Type', { selector: 'label' }) + expect(allergyTypeSelector).toBeInTheDocument() + const medicationSelector = screen.getByRole('combobox', { name: 'Medication' }) expect(medicationSelector).toBeInTheDocument() + const clinicalStatusSelector = screen.getByText('Clinical Status', { selector: 'label' }) + expect(clinicalStatusSelector).toBeInTheDocument() + + const criticalitySelector = screen.getByText('Criticality', { selector: 'label' }) + expect(criticalitySelector).toBeInTheDocument() + + const button = screen.getByRole('button', { name: 'Create allergy' }) + expect(button).toBeInTheDocument() + medicationSelector.click() expect(screen.getByText('Lisinopril')).toBeInTheDocument() })