@@ -77,14 +77,19 @@ it("keeps only the usage limit attached while an active goal waits in the collap
7777 const limit = page . getByText ( "Usage limit reached" , { exact : true } ) ;
7878 const goal = page . getByText ( "Goal active" , { exact : true } ) ;
7979
80- expect ( visibleBanners ( ) ) . toHaveLength ( 1 ) ;
80+ // A retained pointer can expand the stack as it mounts; start outside the hover target.
81+ await userEvent . hover ( limit ) ;
82+ await expect . poll ( visibleBanners ) . toHaveLength ( 1 ) ;
8183 await expect . element ( limit ) . toBeVisible ( ) ;
8284 await expect . element ( goal ) . not . toBeVisible ( ) ;
8385 expect ( container . querySelector ( '[data-slot="composer-banner-attachment"]' ) ?. textContent ) . toBe (
8486 "Usage limit reached" ,
8587 ) ;
8688
87- await page . getByRole ( "button" , { name : "Show other notices" } ) . click ( ) ;
89+ const peek = page . getByRole ( "button" , { name : "Show other notices" } ) ;
90+ // Hover opens the stack and hides the peek before a pointer click can finish.
91+ await act ( ( ) => peek . element ( ) . focus ( ) ) ;
92+ await userEvent . keyboard ( "{Enter}" ) ;
8893 await expect . element ( goal ) . toBeVisible ( ) ;
8994 await expect . element ( limit ) . toBeVisible ( ) ;
9095 await expect . poll ( visibleBanners ) . toHaveLength ( 2 ) ;
@@ -93,6 +98,11 @@ it("keeps only the usage limit attached while an active goal waits in the collap
9398 await expect . element ( goal ) . not . toBeVisible ( ) ;
9499 await expect . element ( limit ) . toBeVisible ( ) ;
95100 expect ( visibleBanners ( ) ) . toHaveLength ( 1 ) ;
101+
102+ await userEvent . hover ( peek ) ;
103+ await expect . element ( goal ) . toBeVisible ( ) ;
104+ await expect . element ( limit ) . toBeVisible ( ) ;
105+ await expect . poll ( visibleBanners ) . toHaveLength ( 2 ) ;
96106} ) ;
97107
98108it ( "reveals the full running command only while its title is clipped" , async ( ) => {
0 commit comments