Skip to content

Commit

Permalink
added a failing test to catch bug signalapp#6119
Browse files Browse the repository at this point in the history
  • Loading branch information
ellisonch committed Jan 18, 2024
1 parent 060c58b commit 22b8184
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ts/test-node/app/SystemTrayService_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,4 +274,20 @@ describe('SystemTrayService', function (this: Mocha.Suite) {

sinon.assert.notCalled(createTrayInstance);
});

it('should remember its maximized state upon restore', () => {
const service = newService();
service.setEnabled(true);
const browserWindow = new BrowserWindow({ show: false });
service.setMainWindow(browserWindow);
const tray = service._getTray();
if (!tray) {
throw new Error('Test setup failed: expected a tray');
}

browserWindow.maximize();
browserWindow.minimize();
tray.emit("click");
assert.isTrue(browserWindow.isMaximized());
});
});

0 comments on commit 22b8184

Please sign in to comment.