mirror of
https://github.com/Fabio286/antares.git
synced 2025-01-28 16:19:24 +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",
|
"html-webpack-plugin": "^5.5.0",
|
||||||
"mini-css-extract-plugin": "~2.4.5",
|
"mini-css-extract-plugin": "~2.4.5",
|
||||||
"node-loader": "^2.0.0",
|
"node-loader": "^2.0.0",
|
||||||
"playwright": "^1.16.3",
|
"playwright": "^1.18.1",
|
||||||
"progress-webpack-plugin": "^1.0.12",
|
"progress-webpack-plugin": "^1.0.12",
|
||||||
"sass": "^1.42.1",
|
"sass": "^1.42.1",
|
||||||
"sass-loader": "^12.3.0",
|
"sass-loader": "^12.3.0",
|
||||||
|
@ -1,18 +1,31 @@
|
|||||||
const { _electron: electron } = require('playwright');
|
const { _electron: electron } = require('playwright');
|
||||||
const { strict: assert } = require('assert');
|
const { strict: assert } = require('assert');
|
||||||
|
|
||||||
|
const isWindows = process.platform === 'win32';
|
||||||
|
async function wait (ms) {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
setTimeout(resolve, ms);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
|
if (isWindows) {
|
||||||
|
console.log('Termporary skipping tests on Windows');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
console.log('Starting tests');
|
console.log('Starting tests');
|
||||||
// Launch Electron app.
|
// Launch Electron app.
|
||||||
const electronApp = await electron.launch({ args: ['dist/main.js'] });
|
const electronApp = await electron.launch({ args: ['dist/main.js'] });
|
||||||
|
|
||||||
|
if (isWindows) await wait(5000);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* App main window state
|
* App main window state
|
||||||
* @type {{isVisible: boolean; isDevToolsOpened: boolean; isCrashed: boolean}}
|
* @type {{isVisible: boolean; isDevToolsOpened: boolean; isCrashed: boolean}}
|
||||||
*/
|
*/
|
||||||
const windowState = await electronApp.evaluate(({ BrowserWindow }) => {
|
const windowState = await electronApp.evaluate(({ BrowserWindow }) => {
|
||||||
const mainWindow = BrowserWindow.getAllWindows()[0];
|
const mainWindow = BrowserWindow.getAllWindows()[0];
|
||||||
|
|
||||||
const getState = () => ({
|
const getState = () => ({
|
||||||
isVisible: mainWindow.isVisible(),
|
isVisible: mainWindow.isVisible(),
|
||||||
isDevToolsOpened: mainWindow.webContents.isDevToolsOpened()
|
isDevToolsOpened: mainWindow.webContents.isDevToolsOpened()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user