mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Test anytime compliments module.
feature introduced 79c79146a5df730cb8e8eee1cc1008639a2c21c7
This commit is contained in:
parent
11c0221f81
commit
1a296a8ca1
38
tests/configs/modules/compliments/compliments_anytime.js
Normal file
38
tests/configs/modules/compliments/compliments_anytime.js
Normal file
@ -0,0 +1,38 @@
|
||||
/* Magic Mirror Test config compliments with anytime type
|
||||
*
|
||||
* 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: 12,
|
||||
units: "metric",
|
||||
electronOptions: {
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
},
|
||||
},
|
||||
|
||||
modules: [
|
||||
{
|
||||
module: "compliments",
|
||||
position: "middle_center",
|
||||
config: {
|
||||
compliments: {
|
||||
morning: ["Good Morning"],
|
||||
afternoon: ["Good Afternoon"],
|
||||
evening: ["Good Evening"],
|
||||
anytime: ["Anytime here"]
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
/*************** DO NOT EDIT THE LINE BELOW ***************/
|
||||
if (typeof module !== "undefined") {module.exports = config;}
|
@ -75,4 +75,27 @@ describe("Compliments module", function () {
|
||||
|
||||
});
|
||||
|
||||
|
||||
describe("Tests anytime for compliments", function() {
|
||||
before(function() {
|
||||
// Set config sample for use in test
|
||||
process.env.MM_CONFIG_FILE = "tests/configs/modules/compliments/compliments_anytime.js";
|
||||
});
|
||||
|
||||
beforeEach(function (done) {
|
||||
app.start().then(function() { done(); } );
|
||||
});
|
||||
|
||||
afterEach(function (done) {
|
||||
app.stop().then(function() { done(); });
|
||||
});
|
||||
|
||||
it("Show anytime or parts of day compliments", function () {
|
||||
return app.client.waitUntilWindowLoaded()
|
||||
.getText(".compliments").then(function (text) {
|
||||
expect(text).to.be.oneOf(["Good Morning", "Good Evening", "Good Afternoon", "Anytime here"]);
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user