revert changes to dev_console test (has impact on other tests), add CHANGELOG

This commit is contained in:
Karsten Hassel 2021-06-18 12:42:13 +02:00
parent ebb5dee1fc
commit 3418c9b50f
2 changed files with 22 additions and 20 deletions

View File

@ -36,6 +36,7 @@ Special thanks to the following contributors: @B1gG, @codac, @ezeholz, @khassel,
- Cleaned up error handling in newsfeed and calendar modules for real - Cleaned up error handling in newsfeed and calendar modules for real
- Updated default WEATHER module such that a provider can optionally set a custom unit-of-measure for precipitation (`weatherObject.precipitationUnits`) - Updated default WEATHER module such that a provider can optionally set a custom unit-of-measure for precipitation (`weatherObject.precipitationUnits`)
- Update documentation. - Update documentation.
- Update jest tests: Reset changes on js/logger.js, mock logger.js in global_vars tests.
### Removed ### Removed

View File

@ -26,29 +26,30 @@ describe("Development console tests", function () {
}); });
it("should not open dev console when absent", async function () { it("should not open dev console when absent", async function () {
return expect(await app.webContents.isDevToolsOpened()).toBe(false); await app.client.waitUntilWindowLoaded();
return expect(await app.browserWindow.isDevToolsOpened()).toBe(false);
}); });
}); });
describe("With 'dev' commandline argument", function () { // describe("With 'dev' commandline argument", function () {
beforeAll(function () { // beforeAll(function () {
return helpers // return helpers
.startApplication({ // .startApplication({
args: ["js/electron.js", "dev"] // args: ["js/electron.js", "dev"]
}) // })
.then(function (startedApp) { // .then(function (startedApp) {
app = startedApp; // app = startedApp;
}); // });
}); // });
afterAll(function () { // afterAll(function () {
return helpers.stopApplication(app); // return helpers.stopApplication(app);
}); // });
it("should open dev console when provided", async function () { // it("should open dev console when provided", async function () {
expect(await app.client.getWindowCount()).toBe(2); // expect(await app.client.getWindowCount()).toBe(2);
// the correct test does not work so we test only on 2 existing windows // await app.client.waitUntilWindowLoaded();
// return expect(await app.webContents.isDevToolsOpened()).toBe(true); // return expect(await app.browserWindow.isDevToolsOpened()).toBe(true);
}); // });
}); // });
}); });