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

@ -13,6 +13,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Add test e2e `show title newsfeed` for newsfeed module. - Add test e2e `show title newsfeed` for newsfeed module.
- Add task to check configuration file. - Add task to check configuration file.
- Add test check URLs of vendors. - Add test check URLs of vendors.
- Add test of match current week number on clock module with showWeek configuration.
### Updated ### Updated
- Added missing keys to Polish translation. - Added missing keys to Polish translation.

View File

@ -34,6 +34,7 @@
"devDependencies": { "devDependencies": {
"chai": "^3.5.0", "chai": "^3.5.0",
"chai-as-promised": "^6.0.0", "chai-as-promised": "^6.0.0",
"current-week-number": "^1.0.7",
"grunt": "latest", "grunt": "latest",
"grunt-eslint": "latest", "grunt-eslint": "latest",
"grunt-jsonlint": "latest", "grunt-jsonlint": "latest",

View File

@ -119,6 +119,14 @@ describe("Clock module", function () {
return app.client.waitUntilWindowLoaded() return app.client.waitUntilWindowLoaded()
.getText(".clock .week").should.eventually.match(weekRegex); .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);
});
}); });
}); });