Skip to content

Commit

Permalink
Merge pull request #884 from electron-userland/v14.0.0
Browse files Browse the repository at this point in the history
v14.0.0
  • Loading branch information
VerteDinde committed Mar 5, 2021
2 parents f4d097a + d2ecadc commit f3c1bfb
Show file tree
Hide file tree
Showing 14 changed files with 233 additions and 64 deletions.
226 changes: 180 additions & 46 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spectron",
"version": "13.0.0",
"version": "14.0.0",
"description": "Easily test your Electron apps using ChromeDriver and WebdriverIO.",
"main": "index.js",
"types": "./lib/spectron.d.ts",
Expand All @@ -26,8 +26,9 @@
"author": "Kevin Sawicki",
"license": "MIT",
"dependencies": {
"@electron/remote": "^1.0.4",
"dev-null": "^0.1.1",
"electron-chromedriver": "^11.0.0",
"electron-chromedriver": "^12.0.0",
"got": "^11.8.0",
"split": "^1.0.1",
"webdriverio": "^6.9.1"
Expand All @@ -39,7 +40,7 @@
"chai-as-promised": "^7.1.1",
"chai-roughly": "^1.0.0",
"check-for-leaks": "^1.2.1",
"electron": "^11.0.3",
"electron": "^12.0.0",
"eslint": "^7.14.0",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-import": "^2.22.1",
Expand Down
2 changes: 1 addition & 1 deletion test/application-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ describe('application loading', function () {
it('gets the render process console logs and clears them', async function () {
await app.client.waitUntilWindowLoaded();
let logs = await app.client.getRenderProcessLogs();
expect(logs.length).to.equal(2);
expect(logs.length).to.equal(3);
expect(logs[0].message).to.contain('7:14 "render warn"');
expect(logs[0].source).to.equal('console-api');
expect(logs[0].level).to.equal('WARNING');
Expand Down
4 changes: 3 additions & 1 deletion test/fixtures/accessible/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { app, BrowserWindow } = require('electron');
require('@electron/remote/main').initialize();

let mainWindow = null;

Expand All @@ -9,7 +10,8 @@ app.on('ready', function () {
height: 600,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true
enableRemoteModule: true,
contextIsolation: false
}
});
mainWindow.loadFile('index.html');
Expand Down
4 changes: 3 additions & 1 deletion test/fixtures/app/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { app, BrowserWindow, ipcMain } = require('electron');
require('@electron/remote/main').initialize();
const fs = require('fs');
const path = require('path');

Expand All @@ -20,7 +21,8 @@ app.on('ready', function () {
height: 100,
webPreferences: {
enableRemoteModule: true,
nodeIntegration: true
nodeIntegration: true,
contextIsolation: false
}
});
mainWindow.loadFile('index.html');
Expand Down
4 changes: 3 additions & 1 deletion test/fixtures/example/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { app, BrowserWindow } = require('electron');
require('@electron/remote/main').initialize();

let mainWindow = null;

Expand All @@ -11,7 +12,8 @@ app.on('ready', function () {
minWidth: 100,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true
enableRemoteModule: true,
contextIsolation: false
}
});
mainWindow.loadFile('index.html');
Expand Down
7 changes: 5 additions & 2 deletions test/fixtures/multi-window/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { app, BrowserWindow } = require('electron');
require('@electron/remote/main').initialize();

let topWindow = null;
let bottomWindow = null;
Expand All @@ -11,7 +12,8 @@ app.on('ready', function () {
height: 100,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true
enableRemoteModule: true,
contextIsolation: false
}
});
topWindow.loadFile('index-top.html');
Expand All @@ -26,7 +28,8 @@ app.on('ready', function () {
height: 50,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true
enableRemoteModule: true,
contextIsolation: false
}
});
bottomWindow.loadFile('index-bottom.html');
Expand Down
4 changes: 3 additions & 1 deletion test/fixtures/no-node-integration/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { app, BrowserWindow } = require('electron');
require('@electron/remote/main').initialize();

let mainWindow = null;

Expand All @@ -10,7 +11,8 @@ app.on('ready', function () {
height: 100,
webPreferences: {
nodeIntegration: false,
enableRemoteModule: true
enableRemoteModule: true,
contextIsolation: false
}
});
mainWindow.loadFile('index.html');
Expand Down
8 changes: 7 additions & 1 deletion test/fixtures/not-accessible/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
<body>
<div>unreadable</div>
<input>
<webview src="web-view.html" nodeintegration>
<webview
src="web-view.html"
enableremotemodule="true"
nodeintegration
webpreferences="contextIsolation=false"
>
</webview>
</body>
</html>
6 changes: 4 additions & 2 deletions test/fixtures/not-accessible/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { app, BrowserWindow } = require('electron');
require('@electron/remote/main').initialize();

let mainWindow = null;

Expand All @@ -9,8 +10,9 @@ app.on('ready', function () {
height: 600,
webPreferences: {
nodeIntegration: true,
webviewTag: true,
enableRemoteModule: true
contextIsolation: false,
enableRemoteModule: true,
webviewTag: true
}
});
mainWindow.loadFile('index.html');
Expand Down
4 changes: 3 additions & 1 deletion test/fixtures/require-name/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { app, BrowserWindow } = require('electron');
require('@electron/remote/main').initialize();
const path = require('path');

let mainWindow = null;
Expand All @@ -12,7 +13,8 @@ app.on('ready', function () {
webPreferences: {
nodeIntegration: false,
preload: path.join(__dirname, 'preload.js'),
enableRemoteModule: true
enableRemoteModule: true,
contextIsolation: false
}
});
mainWindow.loadFile('index.html');
Expand Down
4 changes: 3 additions & 1 deletion test/fixtures/slow/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { app, BrowserWindow } = require('electron');
require('@electron/remote/main').initialize();

let mainWindow = null;

Expand All @@ -10,7 +11,8 @@ app.on('ready', function () {
height: 100,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true
enableRemoteModule: true,
contextIsolation: false
}
});
mainWindow.loadFile('index.html');
Expand Down
11 changes: 10 additions & 1 deletion test/fixtures/web-view/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
</script>
</head>
<body>
<webview src="web-view.html" autosize="on" minwidth="500" minheight="500" nodeintegration></webview>
<webview
src="web-view.html"
autosize="on"
minwidth="500"
minheight="500"
enableremotemodule="true"
nodeintegration
webpreferences="contextIsolation=false"
>
</webview>
</body>
</html>
6 changes: 4 additions & 2 deletions test/fixtures/web-view/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { app, BrowserWindow } = require('electron');
require('@electron/remote/main').initialize();

let mainWindow = null;

Expand All @@ -11,8 +12,9 @@ app.on('ready', function () {
minWidth: 100,
webPreferences: {
nodeIntegration: true,
webviewTag: true,
enableRemoteModule: true
enableRemoteModule: true,
contextIsolation: false,
webviewTag: true
}
});
mainWindow.loadFile('index.html');
Expand Down

0 comments on commit f3c1bfb

Please sign in to comment.