2017-07-24 22:08:12 +02:00
|
|
|
const helpers = require("./global-setup");
|
2017-02-05 11:38:01 +01:00
|
|
|
|
2020-05-11 22:22:32 +02:00
|
|
|
describe("Development console tests", function () {
|
2017-07-24 22:08:12 +02:00
|
|
|
helpers.setupTimeout(this);
|
|
|
|
|
2021-04-08 21:12:56 +02:00
|
|
|
let app = null;
|
2017-07-24 22:08:12 +02:00
|
|
|
|
2021-06-08 00:47:40 +02:00
|
|
|
beforeAll(function () {
|
2017-02-05 11:38:01 +01:00
|
|
|
// Set config sample for use in test
|
|
|
|
process.env.MM_CONFIG_FILE = "tests/configs/env.js";
|
|
|
|
});
|
|
|
|
|
2020-05-11 22:22:32 +02:00
|
|
|
describe("Without 'dev' commandline argument", function () {
|
2021-06-08 00:47:40 +02:00
|
|
|
beforeAll(function () {
|
2017-07-24 22:08:12 +02:00
|
|
|
return helpers
|
|
|
|
.startApplication({
|
|
|
|
args: ["js/electron.js"]
|
|
|
|
})
|
2020-05-11 22:22:32 +02:00
|
|
|
.then(function (startedApp) {
|
2017-07-24 22:08:12 +02:00
|
|
|
app = startedApp;
|
|
|
|
});
|
|
|
|
});
|
2017-02-05 11:38:01 +01:00
|
|
|
|
2021-06-08 00:47:40 +02:00
|
|
|
afterAll(function () {
|
2017-07-24 22:08:12 +02:00
|
|
|
return helpers.stopApplication(app);
|
|
|
|
});
|
2017-02-05 11:38:01 +01:00
|
|
|
|
2021-06-08 00:47:40 +02:00
|
|
|
it("should not open dev console when absent", async function () {
|
|
|
|
await app.client.waitUntilWindowLoaded();
|
2021-06-09 00:19:43 +02:00
|
|
|
return expect(await app.browserWindow.isDevToolsOpened()).toBe(false);
|
2017-02-05 11:38:01 +01:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2021-06-08 00:47:40 +02:00
|
|
|
// describe("With 'dev' commandline argument", function () {
|
|
|
|
// beforeAll(function () {
|
|
|
|
// return helpers
|
|
|
|
// .startApplication({
|
|
|
|
// args: ["js/electron.js", "dev"]
|
|
|
|
// })
|
|
|
|
// .then(function (startedApp) {
|
|
|
|
// app = startedApp;
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
|
|
|
|
// afterAll(function () {
|
|
|
|
// return helpers.stopApplication(app);
|
|
|
|
// });
|
|
|
|
|
|
|
|
// it("should open dev console when provided", async function () {
|
2021-06-09 00:19:43 +02:00
|
|
|
// expect(await app.client.getWindowCount()).toBe(2);
|
2021-06-08 00:47:40 +02:00
|
|
|
// await app.client.waitUntilWindowLoaded();
|
2021-06-09 00:19:43 +02:00
|
|
|
// return expect(await app.browserWindow.isDevToolsOpened()).toBe(true);
|
2021-06-08 00:47:40 +02:00
|
|
|
// });
|
|
|
|
// });
|
2017-02-05 11:38:01 +01:00
|
|
|
});
|