From c5eb73ed3f71b841578e00f316323e5edea1a955 Mon Sep 17 00:00:00 2001 From: Fabio Di Stasio Date: Tue, 15 Feb 2022 09:21:14 +0100 Subject: [PATCH] chore: update electron --- package.json | 2 +- src/main/main.js | 5 ----- tests/app.spec.js | 14 -------------- 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/package.json b/package.json index 1b69408c..cf93c684 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,7 @@ "clean-webpack-plugin": "^4.0.0", "cross-env": "^7.0.2", "css-loader": "^6.5.0", - "electron": "^16.0.8", + "electron": "^17.0.1", "electron-builder": "^22.14.11", "electron-devtools-installer": "^3.2.0", "eslint": "^7.32.0", diff --git a/src/main/main.js b/src/main/main.js index 3c1a8172..87c8ca67 100644 --- a/src/main/main.js +++ b/src/main/main.js @@ -13,7 +13,6 @@ Store.initRenderer(); const isDevelopment = process.env.NODE_ENV !== 'production'; const isMacOS = process.platform === 'darwin'; -const isWindows = process.platform === 'win32'; const gotTheLock = app.requestSingleInstanceLock(); process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = 'true'; @@ -33,7 +32,6 @@ async function createMainWindow () { minHeight: 550, title: 'Antares SQL', autoHideMenuBar: true, - show: !isWindows, // Temporary workaround to https://github.com/electron/electron/issues/30024 icon: nativeImage.createFromDataURL(icon.default), webPreferences: { nodeIntegration: true, @@ -115,9 +113,6 @@ else { mainWindow = await createMainWindow(); createAppMenu(); - if (isWindows) // Temporary workaround to https://github.com/electron/electron/issues/30024 - mainWindow.show(); - // if (isDevelopment) // mainWindow.webContents.openDevTools(); diff --git a/tests/app.spec.js b/tests/app.spec.js index 6507c964..166b2dbc 100644 --- a/tests/app.spec.js +++ b/tests/app.spec.js @@ -1,25 +1,11 @@ const { _electron: electron } = require('playwright'); const { strict: assert } = require('assert'); -const isWindows = process.platform === 'win32'; -async function wait (ms) { - return new Promise(resolve => { - setTimeout(resolve, ms); - }); -} - (async () => { - if (isWindows) { - console.log('Termporary skipping tests on Windows'); - return; - } - console.log('Starting tests'); // Launch Electron app. const electronApp = await electron.launch({ args: ['dist/main.js'] }); - if (isWindows) await wait(5000); - /** * App main window state * @type {{isVisible: boolean; isDevToolsOpened: boolean; isCrashed: boolean}}