From 258198393d859ec0950f431b85bb348acab1acf7 Mon Sep 17 00:00:00 2001 From: Artem Vasiliev Date: Fri, 1 Mar 2019 15:39:15 +0300 Subject: [PATCH] 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 --- e2e/main.spec.ts | 2 +- main.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/e2e/main.spec.ts b/e2e/main.spec.ts index 8b3c356..a20d484 100644 --- a/e2e/main.spec.ts +++ b/e2e/main.spec.ts @@ -22,7 +22,7 @@ describe('angular-electron App', function () { it('creates initial windows', async function () { const count = await client.getWindowCount(); - expect(count).to.equal(2); + expect(count).to.equal(1); }); }); diff --git a/main.ts b/main.ts index 44f897b..eeb84c1 100644 --- a/main.ts +++ b/main.ts @@ -32,7 +32,9 @@ function createWindow() { })); } - win.webContents.openDevTools(); + if (serve) { + win.webContents.openDevTools(); + } // Emitted when the window is closed. win.on('closed', () => {