Fullscreen mode (#1968)
* Add preference to open app in full screen * CLI flag for fullscreen and function to return fullscreen state Parsing the config or the args to define how to open the app. Args take priority over the config, and fallback is the window state. * Optional TS config value Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com> * Remove undefined check for `Config.startInFullscreen` * Fixed optional arg for test * Fixed jest test * fullscreen optional window value * Update src/main/windows/mainWindow.ts Co-authored-by: Guillermo Vayá <guivaya@gmail.com> * Update src/main/windows/mainWindow.ts Co-authored-by: Guillermo Vayá <guivaya@gmail.com> * Type fixes Co-authored-by: Mattermod <mattermod@users.noreply.github.com> Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com> Co-authored-by: Guillermo Vayá <guivaya@gmail.com> Co-authored-by: Devin Binnie <devin.binnie@mattermost.com>
This commit is contained in:
@@ -124,6 +124,13 @@ describe('main/windows/mainWindow', () => {
|
||||
}));
|
||||
});
|
||||
|
||||
it('should open in fullscreen if fullscreen set to true', () => {
|
||||
createMainWindow({fullscreen: true});
|
||||
expect(BrowserWindow).toHaveBeenCalledWith(expect.objectContaining({
|
||||
fullscreen: true,
|
||||
}));
|
||||
});
|
||||
|
||||
it('should set default window size when failing to read bounds from file', () => {
|
||||
fs.readFileSync.mockImplementation(() => 'just a bunch of garbage');
|
||||
createMainWindow({});
|
||||
|
Reference in New Issue
Block a user