Added a week section to the clock module

This commit is contained in:
Johan Hammar
2017-03-28 22:02:30 +02:00
parent e3456cb74f
commit f4509e24c6
6 changed files with 75 additions and 1 deletions

View File

@@ -100,4 +100,25 @@ describe("Clock module", function () {
});
});
describe("with showWeek config enabled", function() {
before(function() {
// Set config sample for use in test
process.env.MM_CONFIG_FILE = "tests/configs/modules/clock/clock_showWeek.js";
});
beforeEach(function (done) {
app.start().then(function() { done(); } );
});
afterEach(function (done) {
app.stop().then(function() { done(); });
});
it("shows week with correct format", function() {
const weekRegex = /^Week [0-9]{1,2}$/;
return app.client.waitUntilWindowLoaded()
.getText(".clock .week").should.eventually.match(weekRegex);
});
});
});