mirror of https://github.com/Fabio286/antares.git
chore: update electron
This commit is contained in:
parent
fa3f3e1fd8
commit
c5eb73ed3f
|
@ -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",
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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}}
|
||||
|
|
Loading…
Reference in New Issue