Add test match week number with clock module with configuration showWeek

This commit is contained in:
Rodrigo Ramírez Norambuena
2017-04-12 22:29:20 -03:00
parent f45bd18cc2
commit 467b1ad4f1
3 changed files with 10 additions and 0 deletions

View File

@@ -119,6 +119,14 @@ describe("Clock module", function () {
return app.client.waitUntilWindowLoaded()
.getText(".clock .week").should.eventually.match(weekRegex);
});
it("shows week with correct number of week of year", function() {
const currentWeekNumber = require('current-week-number')();
const weekToShow = "Week " + currentWeekNumber;
return app.client.waitUntilWindowLoaded()
.getText(".clock .week").should.eventually.equal(weekToShow);
});
});
});