mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
SDA-3033 Add ability to close all windows from SFE-Lite
This commit is contained in:
@@ -38,6 +38,7 @@ jest.mock('../src/app/window-actions', () => {
|
||||
jest.mock('../src/app/window-handler', () => {
|
||||
return {
|
||||
windowHandler: {
|
||||
closeAllWindows: jest.fn(),
|
||||
closeWindow: jest.fn(),
|
||||
createNotificationSettingsWindow: jest.fn(),
|
||||
createScreenPickerWindow: jest.fn(),
|
||||
@@ -458,5 +459,14 @@ describe('main api handler', () => {
|
||||
expect(windowHandler.appMenu.buildMenu).not.toBeCalled();
|
||||
}
|
||||
});
|
||||
|
||||
it('should call closeAllWindows on windowHandler correctly', () => {
|
||||
const spy = jest.spyOn(windowHandler, 'closeAllWindows');
|
||||
const value = {
|
||||
cmd: apiCmds.closeAllWrapperWindows,
|
||||
};
|
||||
ipcMain.send(apiName.symphonyApi, value);
|
||||
expect(spy).toBeCalled();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user