diff --git a/packages/esm-commons-lib/src/components/banner-tags/.patient-status-tag.test.tsx b/packages/esm-commons-lib/src/components/banner-tags/.patient-status-tag.test.tsx index 54908f69a..f4331cec0 100644 --- a/packages/esm-commons-lib/src/components/banner-tags/.patient-status-tag.test.tsx +++ b/packages/esm-commons-lib/src/components/banner-tags/.patient-status-tag.test.tsx @@ -10,6 +10,7 @@ jest.mock('./patientHivStatus', () => ({ describe('PatientStatusBannerTag', () => { const hivPositiveSampleUuid = '138571AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'; + const patientUuid = '22ab3fdb-1510-4675-85aa-f180064de450'; beforeEach(() => { jest.clearAllMocks(); @@ -47,4 +48,30 @@ describe('PatientStatusBannerTag', () => { render(); expect(screen.getByText('HIV Negative')).toBeInTheDocument(); }); + + it('should display the correct outcome tag', () => { + render(); + expect(screen.getByText('Dead')).toBeInTheDocument(); + }); + + it('should display the mother tag', () => { + render(); + expect(screen.getByText('Mother: Jane Doe')).toBeInTheDocument(); + }); + + it('should not display children tag if childrenNames is empty', () => { + render(); + expect(screen.queryByText('Children:')).toBeNull(); + }); + + it('should display children tag for female patients', () => { + render( + , + ); + expect(screen.getByText('Children: Mark obadi || Grace Obadi')).toBeInTheDocument(); + }); });