File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
extensions/podman/packages/extension/src Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -3520,6 +3520,31 @@ describe('Check notify podman setup', () => {
3520
3520
3521
3521
expect ( extensionApi . window . showNotification ) . not . toHaveBeenCalled ( ) ;
3522
3522
} ) ;
3523
+
3524
+ test ( 'reset the notification flag so if podman is uninstalled in future we can show the notification again' , async ( ) => {
3525
+ vi . mocked ( extensionApi . env ) . isLinux = true ;
3526
+
3527
+ // No podman install
3528
+
3529
+ await extension . doMonitorProvider ( provider ) ;
3530
+ expect ( extensionApi . window . showNotification ) . toHaveBeenCalledExactlyOnceWith ( notifySetupPodmanExpectedContent ) ;
3531
+
3532
+ // Podman has been installed
3533
+
3534
+ vi . mocked ( extensionApi . process . exec ) . mockResolvedValueOnce ( {
3535
+ stdout : 'podman version 5.0.0' ,
3536
+ } as unknown as extensionApi . RunResult ) ;
3537
+
3538
+ await extension . doMonitorProvider ( provider ) ;
3539
+
3540
+ expect ( extensionApi . window . showNotification ) . toHaveBeenCalledExactlyOnceWith ( notifySetupPodmanExpectedContent ) ;
3541
+
3542
+ // Podman has been uninstalled -> Show the notification a second time
3543
+
3544
+ await extension . doMonitorProvider ( provider ) ;
3545
+ expect ( extensionApi . window . showNotification ) . toHaveBeenCalledTimes ( 2 ) ;
3546
+ expect ( extensionApi . window . showNotification ) . toHaveBeenLastCalledWith ( notifySetupPodmanExpectedContent ) ;
3547
+ } ) ;
3523
3548
} ) ;
3524
3549
3525
3550
describe ( 'monitorProvider' , ( ) => {
You can’t perform that action at this time.
0 commit comments