mirror of
https://github.com/Fabio286/antares.git
synced 2025-01-15 10:27:07 +01:00
test: temporary skip tests on WIndows
This commit is contained in:
parent
9f033fb994
commit
64deedc5ad
@ -150,7 +150,7 @@
|
||||
"html-webpack-plugin": "^5.5.0",
|
||||
"mini-css-extract-plugin": "~2.4.5",
|
||||
"node-loader": "^2.0.0",
|
||||
"playwright": "^1.16.3",
|
||||
"playwright": "^1.18.1",
|
||||
"progress-webpack-plugin": "^1.0.12",
|
||||
"sass": "^1.42.1",
|
||||
"sass-loader": "^12.3.0",
|
||||
|
@ -1,18 +1,31 @@
|
||||
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}}
|
||||
*/
|
||||
const windowState = await electronApp.evaluate(({ BrowserWindow }) => {
|
||||
const mainWindow = BrowserWindow.getAllWindows()[0];
|
||||
|
||||
const getState = () => ({
|
||||
isVisible: mainWindow.isVisible(),
|
||||
isDevToolsOpened: mainWindow.webContents.isDevToolsOpened()
|
||||
|
Loading…
Reference in New Issue
Block a user