MagicMirror/tests/e2e/without_modules.js

37 lines
988 B
JavaScript
Raw Normal View History

const helpers = require("./global-setup");
2017-02-10 02:19:38 -03:00
describe("Check configuration without modules", function () {
helpers.setupTimeout(this);
2017-02-10 02:19:38 -03:00
2021-04-08 21:12:56 +02:00
let app = null;
beforeEach(function () {
return helpers
.startApplication({
args: ["js/electron.js"]
})
.then(function (startedApp) {
app = startedApp;
});
2017-02-10 02:19:38 -03:00
});
afterEach(function () {
return helpers.stopApplication(app);
2017-02-10 02:19:38 -03:00
});
2021-06-08 00:47:40 +02:00
beforeAll(function () {
// Set config sample for use in test
process.env.MM_CONFIG_FILE = "tests/configs/without_modules.js";
2017-02-10 02:19:38 -03:00
});
2021-01-30 20:29:59 +01:00
it("Show the message MagicMirror title", async function () {
const elem = await app.client.$("#module_1_helloworld .module-content");
2021-06-11 22:24:21 +02:00
return elem.getText("#module_1_helloworld .module-content") === "Magic Mirror2";
2017-02-10 02:19:38 -03:00
});
2021-01-30 20:29:59 +01:00
it("Show the text Michael's website", async function () {
const elem = await app.client.$("#module_5_helloworld .module-content");
2021-06-11 22:24:21 +02:00
return elem.getText("#module_5_helloworld .module-content") === "www.michaelteeuw.nl";
2017-02-10 02:19:38 -03:00
});
});