mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
workaround for dev_console test using getWindowCount
This commit is contained in:
parent
3418c9b50f
commit
cfc0bcd5ad
@ -57,6 +57,7 @@ Special thanks to the following contributors: @B1gG, @codac, @ezeholz, @khassel,
|
||||
- Fix calendar debug check
|
||||
- Really run prettier over all files
|
||||
- Fix logger.js after jest changes
|
||||
- Workaround for dev_console test using getWindowCount.
|
||||
|
||||
## [2.15.0] - 2021-04-01
|
||||
|
||||
|
@ -63,6 +63,11 @@ function createWindow() {
|
||||
|
||||
// Open the DevTools if run with "npm start dev"
|
||||
if (process.argv.includes("dev")) {
|
||||
if (process.env.JEST_WORKER_ID !== undefined) {
|
||||
// if we are running with jest
|
||||
var devtools = new BrowserWindow(electronOptions);
|
||||
mainWindow.webContents.setDevToolsWebContents(devtools.webContents);
|
||||
}
|
||||
mainWindow.webContents.openDevTools();
|
||||
}
|
||||
|
||||
|
@ -31,25 +31,23 @@ describe("Development console tests", function () {
|
||||
});
|
||||
});
|
||||
|
||||
// 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 () {
|
||||
// expect(await app.client.getWindowCount()).toBe(2);
|
||||
// await app.client.waitUntilWindowLoaded();
|
||||
// return expect(await app.browserWindow.isDevToolsOpened()).toBe(true);
|
||||
// });
|
||||
// });
|
||||
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 () {
|
||||
expect(await app.client.getWindowCount()).toBe(2);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user