mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-30 13:09:34 +00:00
Add test e2e helloworld module with default config text.
This commit is contained in:
parent
9285da6c12
commit
daad8bca69
31
tests/configs/modules/helloworld/helloworld_default.js
Normal file
31
tests/configs/modules/helloworld/helloworld_default.js
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* Magic Mirror
|
||||||
|
*
|
||||||
|
* Test config sample module hello world default config
|
||||||
|
*
|
||||||
|
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||||
|
* MIT Licensed.
|
||||||
|
*/
|
||||||
|
|
||||||
|
var config = {
|
||||||
|
port: 8080,
|
||||||
|
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
|
||||||
|
|
||||||
|
language: "en",
|
||||||
|
timeFormat: 24,
|
||||||
|
units: "metric",
|
||||||
|
electronOptions: {
|
||||||
|
webPreferences: {
|
||||||
|
nodeIntegration: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
modules: [
|
||||||
|
{
|
||||||
|
module: "helloworld",
|
||||||
|
position: "bottom_bar"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
/*************** DO NOT EDIT THE LINE BELOW ***************/
|
||||||
|
if (typeof module !== "undefined") {module.exports = config;}
|
@ -4,10 +4,6 @@ const app = globalSetup.app;
|
|||||||
describe("Test helloworld module", function () {
|
describe("Test helloworld module", function () {
|
||||||
this.timeout(20000);
|
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) {
|
beforeEach(function (done) {
|
||||||
app.start().then(function() { done(); } );
|
app.start().then(function() { done(); } );
|
||||||
@ -17,8 +13,28 @@ describe("Test helloworld module", function () {
|
|||||||
app.stop().then(function() { done(); });
|
app.stop().then(function() { done(); });
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Test message helloworld module", function () {
|
describe("helloworld set config text", function () {
|
||||||
return app.client.waitUntilWindowLoaded()
|
before(function() {
|
||||||
.getText(".helloworld").should.eventually.equal("Test HelloWorld Module");
|
// 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!");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user