Add test e2e helloworld module with default config text.

This commit is contained in:
Rodrigo Ramírez Norambuena
2017-03-26 17:36:45 -03:00
parent 9285da6c12
commit daad8bca69
2 changed files with 54 additions and 7 deletions

View File

@@ -4,10 +4,6 @@ const app = globalSetup.app;
describe("Test helloworld module", function () {
this.timeout(20000);
before(function() {
// Set config sample for use in test
process.env.MM_CONFIG_FILE = "tests/configs/modules/helloworld/helloworld.js";
});
beforeEach(function (done) {
app.start().then(function() { done(); } );
@@ -17,8 +13,28 @@ describe("Test helloworld module", function () {
app.stop().then(function() { done(); });
});
it("Test message helloworld module", function () {
return app.client.waitUntilWindowLoaded()
.getText(".helloworld").should.eventually.equal("Test HelloWorld Module");
describe("helloworld set config text", function () {
before(function() {
// Set config sample for use in test
process.env.MM_CONFIG_FILE = "tests/configs/modules/helloworld/helloworld.js";
});
it("Test message helloworld module", function () {
return app.client.waitUntilWindowLoaded()
.getText(".helloworld").should.eventually.equal("Test HelloWorld Module");
});
});
describe("helloworld default config text", function () {
before(function() {
// 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 () {
return app.client.waitUntilWindowLoaded()
.getText(".helloworld").should.eventually.equal("Hello World!");
});
});
});