mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 20:22:53 +00:00
Merge pull request #996 from roramirez/default-hello-world
Default hello world
This commit is contained in:
commit
93ea22c69d
@ -18,6 +18,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- Add unit tests for function `roundValue` in currentweather module.
|
- Add unit tests for function `roundValue` in currentweather module.
|
||||||
- Add test e2e showWeek feature in spanish language.
|
- Add test e2e showWeek feature in spanish language.
|
||||||
- Add warning Log when is used old authentication method in the calendar module.
|
- Add warning Log when is used old authentication method in the calendar module.
|
||||||
|
- Add test e2e for helloworld module with default config text
|
||||||
|
|
||||||
### Updated
|
### Updated
|
||||||
- Changed 'default.js' - listen on all attached interfaces by default.
|
- Changed 'default.js' - listen on all attached interfaces by default.
|
||||||
|
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;}
|
@ -24,16 +24,33 @@ describe("Test helloworld module", function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
before(function() {
|
|
||||||
// Set config sample for use in test
|
|
||||||
process.env.MM_CONFIG_FILE = "tests/configs/modules/helloworld/helloworld.js";
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(function() {
|
afterEach(function() {
|
||||||
return helpers.stopApplication(app);
|
return helpers.stopApplication(app);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
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 () {
|
it("Test message helloworld module", function () {
|
||||||
return app.client.waitUntilWindowLoaded().getText(".helloworld").should.eventually.equal("Test HelloWorld Module");
|
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