Merge pull request #711 from qistoph/develop

Check for dev console instead of counting windows
This commit is contained in:
Michael Teeuw 2017-02-11 22:39:25 +01:00 committed by GitHub
commit 7045f6571f

View File

@ -1,6 +1,7 @@
const Application = require("spectron").Application; const Application = require("spectron").Application;
const path = require("path"); const path = require("path");
const chai = require("chai"); const chai = require("chai");
const expect = chai.expect;
const chaiAsPromised = require("chai-as-promised"); const chaiAsPromised = require("chai-as-promised");
var electronPath = path.join(__dirname, "../../", "node_modules", ".bin", "electron"); var electronPath = path.join(__dirname, "../../", "node_modules", ".bin", "electron");
@ -36,8 +37,7 @@ describe("Argument 'dev'", function () {
app.args = [appPath]; app.args = [appPath];
return app.start().then(function() { return app.start().then(function() {
return app.client.waitUntilWindowLoaded() return expect(app.browserWindow.isDevToolsOpened()).to.eventually.equal(false);
.getWindowCount().should.eventually.equal(1);
}); });
}); });
@ -45,8 +45,7 @@ describe("Argument 'dev'", function () {
app.args = [appPath, "dev"]; app.args = [appPath, "dev"];
return app.start().then(function() { return app.start().then(function() {
return app.client.waitUntilWindowLoaded() return expect(app.browserWindow.isDevToolsOpened()).to.eventually.equal(true);
.getWindowCount().should.eventually.equal(2);
}); });
}); });
}); });