@@ -336,26 +336,35 @@ describe("ScansPageShell", () => {
336336 expect ( screen . queryByRole ( "alert" ) ) . not . toBeInTheDocument ( ) ;
337337 } ) ;
338338
339- it ( "keeps launch scan with filters and mutelist with tabs" , ( ) => {
340- vi . stubEnv ( "UI_CLOUD_ENABLED" , "false" ) ;
339+ it ( "keeps launch scan, import findings, and mutelist with tabs" , ( ) => {
340+ // Given
341+ vi . stubEnv ( "UI_CLOUD_ENABLED" , "true" ) ;
341342
343+ // When
342344 render (
343- < ScansPageShell providers = { providers } hasManageScansPermission >
345+ < ScansPageShell
346+ providers = { providers }
347+ hasManageScansPermission
348+ hasManageIngestionsPermission
349+ >
344350 < div > Scans table</ div >
345351 </ ScansPageShell > ,
346352 ) ;
347353
348- expect (
349- screen . getByRole ( "group" , { name : / s c a n f i l t e r s a n d a c t i o n s / i } ) ,
350- ) . toContainElement ( screen . getByRole ( "button" , { name : / l a u n c h s c a n / i } ) ) ;
351- expect (
352- screen . getByRole ( "group" , { name : / s c a n f i l t e r s a n d a c t i o n s / i } ) ,
353- ) . not . toContainElement (
354- screen . getByRole ( "link" , { name : / c o n f i g u r e m u t e l i s t / i } ) ,
354+ // Then
355+ const tabs = screen . getByRole ( "group" , { name : / s c a n t a b s / i } ) ;
356+ expect ( tabs ) . toContainElement (
357+ screen . getByRole ( "button" , { name : / l a u n c h s c a n / i } ) ,
355358 ) ;
356- expect ( screen . getByRole ( "group" , { name : / s c a n t a b s / i } ) ) . toContainElement (
359+ expect ( tabs ) . toContainElement (
360+ screen . getByRole ( "button" , { name : / i m p o r t f i n d i n g s / i } ) ,
361+ ) ;
362+ expect ( tabs ) . toContainElement (
357363 screen . getByRole ( "link" , { name : / c o n f i g u r e m u t e l i s t / i } ) ,
358364 ) ;
365+ expect (
366+ screen . getByRole ( "group" , { name : / s c a n f i l t e r s / i } ) ,
367+ ) . toContainElement ( screen . getByText ( "Shared scan filters" ) ) ;
359368 } ) ;
360369
361370 it ( "shows the active scans count in the in progress tab" , ( ) => {
0 commit comments