replace Spectron by Playwright

This commit is contained in:
Maxime GRIS
2021-11-13 19:55:50 +01:00
parent 6463897e8f
commit 558c646e2f
15 changed files with 1479 additions and 1386 deletions

View File

@@ -3,9 +3,6 @@ import * as path from 'path';
import * as fs from 'fs';
import * as url from 'url';
// Initialize remote module
require('@electron/remote/main').initialize();
let win: BrowserWindow = null;
const args = process.argv.slice(1),
serve = args.some(val => val === '--serve');
@@ -25,7 +22,6 @@ function createWindow(): BrowserWindow {
nodeIntegration: true,
allowRunningInsecureContent: (serve) ? true : false,
contextIsolation: false, // false if you want to run e2e test with Spectron
enableRemoteModule : true // true if you want to run e2e test with Spectron or use remote module in renderer context (ie. Angular)
},
});

18
app/package-lock.json generated
View File

@@ -1,13 +1,5 @@
{
"name": "angular-electron",
"version": "10.1.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@electron/remote": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@electron/remote/-/remote-1.2.0.tgz",
"integrity": "sha512-C774t2DFVJsa+dxU9Gc2nYzylRZoJ79I0Sxrh8T9cN69fBkntfGbyBEQiD9UfZopqL0CYLzk1anY2Ywhql6h1w=="
}
}
}
{
"name": "angular-electron",
"version": "10.1.0",
"lockfileVersion": 1
}

View File

@@ -3,7 +3,5 @@
"version": "10.1.0",
"main": "main.js",
"private": true,
"dependencies": {
"@electron/remote": "1.2.0"
}
"dependencies": {}
}