From 4e026aee95dc4e60f50381a418363c5e142bb964 Mon Sep 17 00:00:00 2001 From: NikolaiMadlener Date: Fri, 8 Nov 2024 12:55:21 +0100 Subject: [PATCH] add missing input test in allergy form --- src/components/AllergyForm/AllergyForm.test.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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() })