fix(e2e): without devTools

according to https://github.com/electron/spectron/issues/174#issuecomment-319242097 this might help re error like in https://travis-ci.org/artemv/angular-electron-spectron/builds/500315009

..but this also could be node version dependent as I don't have it locally on MacOS & Node 9
This commit is contained in:
Artem Vasiliev
2019-03-01 15:39:15 +03:00
parent 901438aab4
commit 258198393d
2 changed files with 4 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ describe('angular-electron App', function () {
it('creates initial windows', async function () { it('creates initial windows', async function () {
const count = await client.getWindowCount(); const count = await client.getWindowCount();
expect(count).to.equal(2); expect(count).to.equal(1);
}); });
}); });

View File

@@ -32,7 +32,9 @@ function createWindow() {
})); }));
} }
win.webContents.openDevTools(); if (serve) {
win.webContents.openDevTools();
}
// Emitted when the window is closed. // Emitted when the window is closed.
win.on('closed', () => { win.on('closed', () => {