File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/frontend/src/pages/draft Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -161,11 +161,13 @@ describe('Draft Component', () => {
161161 expect ( sectionCards . length ) . toBe ( 0 )
162162 } )
163163
164- test ( 'renders SectionCard for each section in draftedDocument' , ( ) => {
164+ test ( 'renders SectionCard for each section in draftedDocument' , async ( ) => {
165165 renderComponent ( mockAppState )
166166
167- const sectionCards = screen . getAllByTestId ( 'mock-section-card' )
168- expect ( sectionCards . length ) . toBe ( mockAppState . state . draftedDocument . sections . length )
167+ await waitFor ( ( ) => {
168+ const sectionCards = screen . getAllByTestId ( 'mock-section-card' ) ;
169+ expect ( sectionCards . length ) . toBe ( mockAppState . state . draftedDocument . sections . length ) ;
170+ } ) ;
169171 } )
170172
171173 test ( 'getTitle function returns correct title when draftedDocumentTitle is valid' , ( ) => {
You can’t perform that action at this time.
0 commit comments