mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 04:45:17 +00:00
Second test case anytime feature module compliments
Suggested by @fewieden PL #725
This commit is contained in:
@@ -57,11 +57,7 @@ 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";
|
||||
});
|
||||
describe("Feature anytime in compliments module", function() {
|
||||
|
||||
beforeEach(function (done) {
|
||||
app.start().then(function() { done(); } );
|
||||
@@ -71,12 +67,36 @@ describe("Compliments module", function () {
|
||||
app.stop().then(function() { done(); });
|
||||
});
|
||||
|
||||
it("Show anytime because if configure empty parts of day compliments and set anytime compliments", function () {
|
||||
return app.client.waitUntilWindowLoaded()
|
||||
.getText(".compliments").then(function (text) {
|
||||
expect(text).to.be.oneOf(["Anytime here"]);
|
||||
})
|
||||
|
||||
describe("Set anytime and empty compliments for morning, evening and afternoon ", function() {
|
||||
before(function() {
|
||||
// Set config sample for use in test
|
||||
process.env.MM_CONFIG_FILE = "tests/configs/modules/compliments/compliments_anytime.js";
|
||||
});
|
||||
|
||||
it("Show anytime because if configure empty parts of day compliments and set anytime compliments", function () {
|
||||
return app.client.waitUntilWindowLoaded()
|
||||
.getText(".compliments").then(function (text) {
|
||||
expect(text).to.be.oneOf(["Anytime here"]);
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
describe("Only anytime present in configuration compliments", function() {
|
||||
before(function() {
|
||||
// Set config sample for use in test
|
||||
process.env.MM_CONFIG_FILE = "tests/configs/modules/compliments/compliments_only_anytime.js";
|
||||
});
|
||||
|
||||
it("Show anytime compliments", function () {
|
||||
return app.client.waitUntilWindowLoaded()
|
||||
.getText(".compliments").then(function (text) {
|
||||
expect(text).to.be.oneOf(["Anytime here"]);
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user