fix: stabilize coverage and immersion tracker tests

This commit is contained in:
2026-03-28 15:24:35 -07:00
parent baf2553f57
commit 572bceecb0
4 changed files with 35 additions and 14 deletions

View File

@@ -11,21 +11,23 @@ function createSetupWindowHandler<TWindow>(
deps: { createBrowserWindow: (options: Electron.BrowserWindowConstructorOptions) => TWindow },
config: SetupWindowConfig,
) {
return (): TWindow =>
deps.createBrowserWindow({
return (): TWindow => {
const options: Electron.BrowserWindowConstructorOptions = {
width: config.width,
height: config.height,
title: config.title,
show: true,
autoHideMenuBar: true,
resizable: config.resizable,
minimizable: config.minimizable,
maximizable: config.maximizable,
webPreferences: {
nodeIntegration: false,
contextIsolation: true,
},
});
};
if (config.resizable !== undefined) options.resizable = config.resizable;
if (config.minimizable !== undefined) options.minimizable = config.minimizable;
if (config.maximizable !== undefined) options.maximizable = config.maximizable;
return deps.createBrowserWindow(options);
};
}
export function createCreateFirstRunSetupWindowHandler<TWindow>(deps: {