@@ -194,20 +194,40 @@ mountUpdateNotificationFixture(DesktopUpdateNotification);`,
194194 }
195195 )
196196
197+ await check ( 'stack eviction does not count as dismissing the update offer' , async ( ) => {
198+ await publish ( { status : 'checking' , version : '2.4.0' } )
199+ await expect ( restart ) . toHaveCount ( 0 )
200+ await publish ( { status : 'ready' , version : '2.4.0' } )
201+ await expect ( restart ) . toHaveCount ( 1 )
202+ await page . getByRole ( 'button' , { name : 'Fill notification stack' } ) . click ( )
203+ await expect ( restart ) . toHaveCount ( 0 )
204+ await page . getByRole ( 'button' , { name : 'Clear notifications' } ) . click ( )
205+ await expect ( notice ) . toHaveCount ( 0 )
206+ await publish ( { status : 'checking' , version : '2.4.0' } )
207+ await page . evaluate (
208+ ( ) =>
209+ new Promise < void > ( ( resolve ) =>
210+ requestAnimationFrame ( ( ) => requestAnimationFrame ( ( ) => resolve ( ) ) )
211+ )
212+ )
213+ await publish ( { status : 'ready' , version : '2.4.0' } )
214+ await expect ( restart ) . toBeVisible ( )
215+ } )
216+
197217 await check ( 'actions reach the real preload IPC with the correct operation' , async ( ) => {
198218 for ( const { state, action, channel } of [
199219 {
200- state : { status : 'ready' , version : '2.1 .0' } ,
220+ state : { status : 'ready' , version : '2.4 .0' } ,
201221 action : restart ,
202222 channel : 'desktop:updates:install' ,
203223 } ,
204224 {
205- state : { status : 'available' , version : '2.2 .0' } ,
225+ state : { status : 'available' , version : '2.5 .0' } ,
206226 action : download ,
207227 channel : 'desktop:updates:check' ,
208228 } ,
209229 {
210- state : { status : 'available' , version : '2.3 .0' , manual : true } ,
230+ state : { status : 'available' , version : '2.6 .0' , manual : true } ,
211231 action : download ,
212232 channel : 'desktop:updates:install' ,
213233 } ,
0 commit comments