From 467b1ad4f16131a67e878c6782b40773c5d0f9a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?=
Date: Wed, 12 Apr 2017 22:29:20 -0300
Subject: [PATCH 1/2] Add test match week number with clock module with
configuration showWeek
---
CHANGELOG.md | 1 +
package.json | 1 +
tests/e2e/modules/clock_spec.js | 8 ++++++++
3 files changed, 10 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 675db64592..3060c6c714 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Add test e2e `show title newsfeed` for newsfeed module.
- Add task to check configuration file.
- Add test check URLs of vendors.
+- Add test of match current week number on clock module with showWeek configuration.
### Updated
- Added missing keys to Polish translation.
diff --git a/package.json b/package.json
index c3bdae636e..1af96f2242 100644
--- a/package.json
+++ b/package.json
@@ -34,6 +34,7 @@
"devDependencies": {
"chai": "^3.5.0",
"chai-as-promised": "^6.0.0",
+ "current-week-number": "^1.0.7",
"grunt": "latest",
"grunt-eslint": "latest",
"grunt-jsonlint": "latest",
diff --git a/tests/e2e/modules/clock_spec.js b/tests/e2e/modules/clock_spec.js
index a24b38d673..948b1c31fd 100644
--- a/tests/e2e/modules/clock_spec.js
+++ b/tests/e2e/modules/clock_spec.js
@@ -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);
+ });
+
});
});
From 298e32aadae970a56b8d5679417bc0a7b92c0053 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?=
Date: Tue, 18 Apr 2017 22:38:29 -0300
Subject: [PATCH 2/2] Fix Grunt error 124:38 error Strings must use
doublequote quotes
---
tests/e2e/modules/clock_spec.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/e2e/modules/clock_spec.js b/tests/e2e/modules/clock_spec.js
index 948b1c31fd..6f776f121b 100644
--- a/tests/e2e/modules/clock_spec.js
+++ b/tests/e2e/modules/clock_spec.js
@@ -121,7 +121,7 @@ describe("Clock module", function () {
});
it("shows week with correct number of week of year", function() {
- const currentWeekNumber = require('current-week-number')();
+ const currentWeekNumber = require("current-week-number")();
const weekToShow = "Week " + currentWeekNumber;
return app.client.waitUntilWindowLoaded()
.getText(".clock .week").should.eventually.equal(weekToShow);