2017-07-24 22:08:12 +02:00
|
|
|
const helpers = require("../global-setup");
|
|
|
|
|
|
|
|
const describe = global.describe;
|
|
|
|
const it = global.it;
|
|
|
|
const beforeEach = global.beforeEach;
|
|
|
|
const afterEach = global.afterEach;
|
|
|
|
|
2020-05-11 22:22:32 +02:00
|
|
|
describe("Test helloworld module", function () {
|
2017-07-24 22:08:12 +02:00
|
|
|
helpers.setupTimeout(this);
|
|
|
|
|
|
|
|
var app = null;
|
|
|
|
|
2020-05-11 22:22:32 +02:00
|
|
|
beforeEach(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-01-30 12:24:49 -03:00
|
|
|
});
|
|
|
|
|
2020-05-11 22:22:32 +02:00
|
|
|
afterEach(function () {
|
2017-07-24 22:08:12 +02:00
|
|
|
return helpers.stopApplication(app);
|
2017-01-30 12:24:49 -03:00
|
|
|
});
|
|
|
|
|
2017-03-26 17:36:45 -03:00
|
|
|
describe("helloworld set config text", function () {
|
2020-05-11 22:22:32 +02:00
|
|
|
before(function () {
|
2017-03-26 17:36:45 -03:00
|
|
|
// Set config sample for use in test
|
|
|
|
process.env.MM_CONFIG_FILE = "tests/configs/modules/helloworld/helloworld.js";
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Test message helloworld module", function () {
|
2020-05-11 22:22:32 +02:00
|
|
|
return app.client.waitUntilWindowLoaded().getText(".helloworld").should.eventually.equal("Test HelloWorld Module");
|
2017-03-26 17:36:45 -03:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe("helloworld default config text", function () {
|
2020-05-11 22:22:32 +02:00
|
|
|
before(function () {
|
2017-03-26 17:36:45 -03:00
|
|
|
// Set config sample for use in test
|
|
|
|
process.env.MM_CONFIG_FILE = "tests/configs/modules/helloworld/helloworld_default.js";
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Test message helloworld module", function () {
|
2020-05-11 22:22:32 +02:00
|
|
|
return app.client.waitUntilWindowLoaded().getText(".helloworld").should.eventually.equal("Hello World!");
|
2017-03-26 17:36:45 -03:00
|
|
|
});
|
2017-01-30 12:24:49 -03:00
|
|
|
});
|
|
|
|
});
|