@@ -28,46 +28,58 @@ const MOCK_BUNDLE: fhir4.Bundle = {
2828} ;
2929
3030describe ( 'PopulationCalculation' , ( ) => {
31- it ( 'should not render Calculate Population Results button by default' , ( ) => {
32- render (
33- mantineRecoilWrap (
34- < >
35- < RouterContext . Provider value = { createMockRouter ( { pathname : '/' } ) } >
36- < PopulationCalculation />
37- </ RouterContext . Provider >
38- </ >
39- )
40- ) ;
31+ it ( 'should not render Calculate Population Results button by default' , async ( ) => {
32+ await act ( async ( ) => {
33+ render (
34+ mantineRecoilWrap (
35+ < >
36+ < Suspense >
37+ < RouterContext . Provider value = { createMockRouter ( { pathname : '/' } ) } >
38+ < PopulationCalculation />
39+ </ RouterContext . Provider >
40+ </ Suspense >
41+ </ >
42+ )
43+ ) ;
44+ } ) ;
4145
4246 const calculateButton = screen . queryByTestId ( 'calculate-all-button' ) ;
4347 expect ( calculateButton ) . not . toBeInTheDocument ( ) ;
4448 } ) ;
4549
46- it ( 'should not render Show Table button by default' , ( ) => {
47- render (
48- mantineRecoilWrap (
49- < >
50- < RouterContext . Provider value = { createMockRouter ( { pathname : '/' } ) } >
51- < PopulationCalculation />
52- </ RouterContext . Provider >
53- </ >
54- )
55- ) ;
50+ it ( 'should not render Show Table button by default' , async ( ) => {
51+ await act ( async ( ) => {
52+ render (
53+ mantineRecoilWrap (
54+ < >
55+ < Suspense >
56+ < RouterContext . Provider value = { createMockRouter ( { pathname : '/' } ) } >
57+ < PopulationCalculation />
58+ </ RouterContext . Provider >
59+ </ Suspense >
60+ </ >
61+ )
62+ ) ;
63+ } ) ;
5664
5765 const showTableButton = screen . queryByTestId ( 'show-table-button' ) ;
5866 expect ( showTableButton ) . not . toBeInTheDocument ( ) ;
5967 } ) ;
6068
61- it ( 'should not render Show Clause Coverage button by default' , ( ) => {
62- render (
63- mantineRecoilWrap (
64- < >
65- < RouterContext . Provider value = { createMockRouter ( { pathname : '/' } ) } >
66- < PopulationCalculation />
67- </ RouterContext . Provider >
68- </ >
69- )
70- ) ;
69+ it ( 'should not render Show Clause Coverage button by default' , async ( ) => {
70+ await act ( async ( ) => {
71+ render (
72+ mantineRecoilWrap (
73+ < >
74+ < Suspense >
75+ < RouterContext . Provider value = { createMockRouter ( { pathname : '/' } ) } >
76+ < PopulationCalculation />
77+ </ RouterContext . Provider >
78+ </ Suspense >
79+ </ >
80+ )
81+ ) ;
82+ } ) ;
7183
7284 const showClauseCoverageButton = screen . queryByTestId ( 'show-coverage-button' ) ;
7385 expect ( showClauseCoverageButton ) . not . toBeInTheDocument ( ) ;
0 commit comments