2017-07-24 22:08:12 +02:00
|
|
|
const helpers = require("./global-setup");
|
2017-02-10 02:19:38 -03:00
|
|
|
const path = require("path");
|
2017-07-24 22:08:12 +02:00
|
|
|
const request = require("request");
|
2017-02-10 02:19:38 -03:00
|
|
|
|
2017-07-24 22:08:12 +02:00
|
|
|
const expect = require("chai").expect;
|
2017-02-10 02:19:38 -03:00
|
|
|
|
2017-07-24 22:08:12 +02:00
|
|
|
const describe = global.describe;
|
|
|
|
const it = global.it;
|
|
|
|
const beforeEach = global.beforeEach;
|
|
|
|
const afterEach = global.afterEach;
|
2017-02-10 02:19:38 -03:00
|
|
|
|
|
|
|
describe("Check configuration without modules", function () {
|
2017-07-24 22:08:12 +02:00
|
|
|
helpers.setupTimeout(this);
|
2017-02-10 02:19:38 -03:00
|
|
|
|
2017-07-24 22:08:12 +02:00
|
|
|
var app = null;
|
|
|
|
|
|
|
|
beforeEach(function () {
|
|
|
|
return helpers.startApplication({
|
|
|
|
args: ["js/electron.js"]
|
|
|
|
}).then(function (startedApp) { app = startedApp; })
|
2017-02-10 02:19:38 -03:00
|
|
|
});
|
|
|
|
|
2017-07-24 22:08:12 +02:00
|
|
|
afterEach(function () {
|
|
|
|
return helpers.stopApplication(app);
|
2017-02-10 02:19:38 -03:00
|
|
|
});
|
|
|
|
|
2017-07-24 22:08:12 +02:00
|
|
|
before(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
|
|
|
});
|
|
|
|
|
|
|
|
it("Show the message MagicMirror title", function () {
|
|
|
|
return app.client.waitUntilWindowLoaded()
|
|
|
|
.getText("#module_1_helloworld .module-content").should.eventually.equal("Magic Mirror2")
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Show the text Michael's website", function () {
|
|
|
|
return app.client.waitUntilWindowLoaded()
|
|
|
|
.getText("#module_5_helloworld .module-content").should.eventually.equal("www.michaelteeuw.nl");
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|