@@ -165,16 +165,12 @@ describe('elements/content-sharing/ContentSharingV2', () => {
165165 } ) ;
166166
167167 renderComponent ( ) ;
168- await waitFor ( ( ) => {
169- expect ( screen . getByRole ( 'heading' , { name : / B o x D e v e l o p m e n t G u i d e .p d f / i } ) ) . toBeVisible ( ) ;
170- } ) ;
168+ expect ( await screen . findByRole ( 'heading' , { name : 'Share ‘Box Development Guide.pdf’' } ) ) . toBeVisible ( ) ;
171169 } ) ;
172170
173171 test ( 'should render UnifiedShareModal when custom config is provided' , async ( ) => {
174172 renderComponent ( { config : { collaborationLimit : 3 } } ) ;
175- await waitFor ( ( ) => {
176- expect ( screen . getByRole ( 'heading' , { name : / B o x D e v e l o p m e n t G u i d e .p d f / i } ) ) . toBeVisible ( ) ;
177- } ) ;
173+ expect ( await screen . findByRole ( 'heading' , { name : 'Share ‘Box Development Guide.pdf’' } ) ) . toBeVisible ( ) ;
178174 } ) ;
179175
180176 test ( 'should allow custom config to override default config' , async ( ) => {
@@ -183,10 +179,8 @@ describe('elements/content-sharing/ContentSharingV2', () => {
183179 getFileAPI : jest . fn ( ) . mockReturnValue ( { getFile : getFileMockWithSharedLink } ) ,
184180 } ;
185181 renderComponent ( { api : apiWithSharedLink , config : { sharedLinkEmail : true } } ) ;
186- await waitFor ( ( ) => {
187- expect ( screen . getByRole ( 'heading' , { name : / B o x D e v e l o p m e n t G u i d e .p d f / i } ) ) . toBeVisible ( ) ;
188- expect ( screen . getByRole ( 'button' , { name : 'Send Shared Link' } ) ) . toBeVisible ( ) ;
189- } ) ;
182+ expect ( await screen . findByRole ( 'heading' , { name : 'Share ‘Box Development Guide.pdf’' } ) ) . toBeVisible ( ) ;
183+ expect ( await screen . findByRole ( 'button' , { name : 'Send Shared Link' } ) ) . toBeVisible ( ) ;
190184 } ) ;
191185
192186 describe ( 'getError function' , ( ) => {
0 commit comments