@@ -379,12 +379,14 @@ describe('report run page', () => {
379379 . mocked ( generated . ReportControllerService . exportReport )
380380 . mockResolvedValue ( MOCK_RESULT ) ;
381381
382- const { getByRole, findByRole, findByLabelText, container } = renderWithRouter ( ) ;
382+ const { getByRole, findByRole, findAllByText , findByLabelText, container } = renderWithRouter ( ) ;
383383
384384 expect ( getByRole ( 'status' ) ) . toHaveTextContent ( 'Loading' ) ;
385385
386386 expect ( mockConfigApi ) . toHaveBeenCalled ( ) ;
387387
388+ expect ( await findAllByText ( 'Other filters' ) ) . toHaveLength ( 2 ) ;
389+
388390 const input = await findByLabelText ( 'Full Name' ) ;
389391 await userEvent . type ( input , 'test' ) ;
390392
@@ -494,12 +496,14 @@ describe('report run page', () => {
494496 . mocked ( generated . ReportControllerService . exportReport )
495497 . mockResolvedValue ( MOCK_RESULT ) ;
496498
497- const { getByRole, findByRole, findByLabelText, container } = renderWithRouter ( ) ;
499+ const { getByRole, findByRole, findAllByText , findByLabelText, container } = renderWithRouter ( ) ;
498500
499501 expect ( getByRole ( 'status' ) ) . toHaveTextContent ( 'Loading' ) ;
500502
501503 expect ( mockConfigApi ) . toHaveBeenCalled ( ) ;
502504
505+ expect ( await findAllByText ( 'Time' ) ) . toHaveLength ( 2 ) ;
506+
503507 expect ( await findByLabelText ( 'Full Name' ) ) . toBeVisible ( ) ;
504508 const fromInput = await findByLabelText ( 'From' ) ;
505509 const toInput = await findByLabelText ( 'To' ) ;
@@ -621,12 +625,14 @@ describe('report run page', () => {
621625 . mocked ( generated . ReportControllerService . exportReport )
622626 . mockResolvedValue ( MOCK_RESULT ) ;
623627
624- const { getByRole, findByRole, findByLabelText, container } = renderWithRouter ( ) ;
628+ const { getByRole, findByRole, findAllByText , findByLabelText, container } = renderWithRouter ( ) ;
625629
626630 expect ( getByRole ( 'status' ) ) . toHaveTextContent ( 'Loading' ) ;
627631
628632 expect ( mockConfigApi ) . toHaveBeenCalled ( ) ;
629633
634+ expect ( await findAllByText ( 'Time' ) ) . toHaveLength ( 2 ) ;
635+
630636 expect ( await findByLabelText ( 'Full Name' ) ) . toBeVisible ( ) ;
631637 const fromInput = await findByLabelText ( 'From' ) ;
632638 const toInput = await findByLabelText ( 'To' ) ;
@@ -756,12 +762,14 @@ describe('report run page', () => {
756762 . mocked ( generated . ReportControllerService . exportReport )
757763 . mockResolvedValue ( MOCK_RESULT ) ;
758764
759- const { getByRole, findByRole, findByLabelText, container } = renderWithRouter ( ) ;
765+ const { getByRole, findByRole, findAllByText , findByLabelText, container } = renderWithRouter ( ) ;
760766
761767 expect ( getByRole ( 'status' ) ) . toHaveTextContent ( 'Loading' ) ;
762768
763769 expect ( mockConfigApi ) . toHaveBeenCalled ( ) ;
764770
771+ expect ( await findAllByText ( 'Time' ) ) . toHaveLength ( 2 ) ;
772+
765773 expect ( await findByLabelText ( 'Full Name' ) ) . toBeVisible ( ) ;
766774 const fromMonthInput = await findByLabelText ( 'From Month' ) ;
767775 await userEvent . selectOptions ( fromMonthInput , '1' ) ;
@@ -905,12 +913,14 @@ describe('report run page', () => {
905913 { value : '04' , name : 'Arizona' } ,
906914 ] ) ;
907915
908- const { getByRole, findByRole, findByLabelText, container } = renderWithRouter ( ) ;
916+ const { getByRole, findByRole, findAllByText , findByLabelText, container } = renderWithRouter ( ) ;
909917
910918 expect ( getByRole ( 'status' ) ) . toHaveTextContent ( 'Loading' ) ;
911919
912920 expect ( mockConfigApi ) . toHaveBeenCalled ( ) ;
913921
922+ expect ( await findAllByText ( 'Geographic area' ) ) . toHaveLength ( 2 ) ;
923+
914924 expect ( await findByRole ( 'option' , { name : 'Georgia' } ) ) . toBeVisible ( ) ;
915925
916926 // component refreshes when options populates, so can't do this earlier
@@ -1220,12 +1230,14 @@ describe('report run page', () => {
12201230 . mockResolvedValue ( MOCK_RESULT ) ;
12211231 vi . mocked ( options . selectableResolver ) . mockImplementation ( mockOptionApiImpl ) ;
12221232
1223- const { getByRole, findByRole, findByLabelText, container } = renderWithRouter ( ) ;
1233+ const { getByRole, findByRole, findAllByText , findByLabelText, container } = renderWithRouter ( ) ;
12241234
12251235 expect ( getByRole ( 'status' ) ) . toHaveTextContent ( 'Loading' ) ;
12261236
12271237 expect ( mockConfigApi ) . toHaveBeenCalled ( ) ;
12281238
1239+ expect ( await findAllByText ( 'Geographic area' ) ) . toHaveLength ( 2 ) ;
1240+
12291241 expect ( await findByRole ( 'option' , { name : 'Dekalb County' } ) ) . toBeVisible ( ) ;
12301242
12311243 // component refreshes when options populates, so can't do this earlier
@@ -1552,12 +1564,14 @@ describe('report run page', () => {
15521564 . mockResolvedValue ( MOCK_RESULT ) ;
15531565 vi . mocked ( options . selectableResolver ) . mockImplementation ( mockOptionApiImpl ) ;
15541566
1555- const { getByRole, findByRole, findByLabelText, container } = renderWithRouter ( ) ;
1567+ const { getByRole, findByRole, findAllByText , findByLabelText, container } = renderWithRouter ( ) ;
15561568
15571569 expect ( getByRole ( 'status' ) ) . toHaveTextContent ( 'Loading' ) ;
15581570
15591571 expect ( mockConfigApi ) . toHaveBeenCalled ( ) ;
15601572
1573+ expect ( await findAllByText ( 'Condition' ) ) . toHaveLength ( 2 ) ;
1574+
15611575 expect ( await findByRole ( 'option' , { name : '2019 Novel Coronavirus' } ) ) . toBeVisible ( ) ;
15621576
15631577 // component refreshes when options populates, so can't do this earlier
@@ -1829,12 +1843,14 @@ describe('report run page', () => {
18291843 . mockResolvedValue ( MOCK_RESULT ) ;
18301844 vi . mocked ( useConceptOptions ) . mockReturnValue ( mockOptionApiImpl ) ;
18311845
1832- const { getByRole, findByRole, findByLabelText, container } = renderWithRouter ( ) ;
1846+ const { getByRole, findByRole, findAllByText , findByLabelText, container } = renderWithRouter ( ) ;
18331847
18341848 expect ( getByRole ( 'status' ) ) . toHaveTextContent ( 'Loading' ) ;
18351849
18361850 expect ( mockConfigApi ) . toHaveBeenCalled ( ) ;
18371851
1852+ expect ( await findAllByText ( 'Condition' ) ) . toHaveLength ( 2 ) ;
1853+
18381854 expect ( await findByRole ( 'option' , { name : '100 - Chancroid' } ) ) . toBeVisible ( ) ;
18391855
18401856 expect ( useConceptOptions ) . toHaveBeenCalledWith ( 'CASE_DIAGNOSIS_STD' , { lazy : false } ) ;
@@ -2103,12 +2119,14 @@ describe('report run page', () => {
21032119 . mocked ( generated . ReportControllerService . exportReport )
21042120 . mockResolvedValue ( MOCK_RESULT ) ;
21052121
2106- const { getByRole, findByRole, findByLabelText, container } = renderWithRouter ( ) ;
2122+ const { getByRole, findByRole, findAllByText , findByLabelText, container } = renderWithRouter ( ) ;
21072123
21082124 expect ( getByRole ( 'status' ) ) . toHaveTextContent ( 'Loading' ) ;
21092125
21102126 expect ( mockConfigApi ) . toHaveBeenCalled ( ) ;
21112127
2128+ expect ( await findAllByText ( 'Time' ) ) . toHaveLength ( 2 ) ;
2129+
21122130 const input = await findByLabelText ( 'Duplicate Investigations Time Frame' ) ;
21132131 await user . type ( input , '5' ) ;
21142132
@@ -2322,12 +2340,14 @@ describe('report run page', () => {
23222340 . mockResolvedValue ( MOCK_RESULT ) ;
23232341 vi . mocked ( options . selectableResolver ) . mockImplementation ( mockOptionApiImpl ) ;
23242342
2325- const { getByRole, findByRole, findByLabelText, container } = renderWithRouter ( ) ;
2343+ const { getByRole, findByRole, findAllByText , findByLabelText, container } = renderWithRouter ( ) ;
23262344
23272345 expect ( getByRole ( 'status' ) ) . toHaveTextContent ( 'Loading' ) ;
23282346
23292347 expect ( mockConfigApi ) . toHaveBeenCalled ( ) ;
23302348
2349+ expect ( await findAllByText ( 'Other filters' ) ) . toHaveLength ( 2 ) ;
2350+
23312351 expect ( await findByRole ( 'option' , { name : 'Jyn Erso' } ) ) . toBeVisible ( ) ;
23322352
23332353 // component refreshes when options populates, so can't do this earlier
0 commit comments