From a1a4192835a23116d3d7cf9b7e72313d458f8195 Mon Sep 17 00:00:00 2001 From: rejas Date: Sun, 2 Aug 2020 15:19:36 +0200 Subject: [PATCH] Fix clock test, remove now unneeded dependency --- package-lock.json | 6 ------ package.json | 1 - tests/e2e/modules/clock_spec.js | 9 ++++----- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index a3214e7a..5283bf04 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1745,12 +1745,6 @@ "cssom": "0.3.x" } }, - "current-week-number": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/current-week-number/-/current-week-number-1.0.7.tgz", - "integrity": "sha1-VnJ4rrX+WN7LFQuayGT5Pc5O2XI=", - "dev": true - }, "currently-unhandled": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", diff --git a/package.json b/package.json index f2e95b7c..bc47eb01 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,6 @@ "@prantlf/jsonlint": "^10.2.0", "chai": "^4.2.0", "chai-as-promised": "^7.1.1", - "current-week-number": "^1.0.7", "danger": "^3.1.3", "eslint-config-prettier": "^6.11.0", "eslint-plugin-jsdoc": "^30.1.0", diff --git a/tests/e2e/modules/clock_spec.js b/tests/e2e/modules/clock_spec.js index fb3cae37..2bf148c6 100644 --- a/tests/e2e/modules/clock_spec.js +++ b/tests/e2e/modules/clock_spec.js @@ -1,5 +1,6 @@ const helpers = require("../global-setup"); const expect = require("chai").expect; +const moment = require("moment"); const describe = global.describe; const it = global.it; @@ -95,11 +96,9 @@ describe("Clock module", function () { }); it("should show the week with the correct number of week of year", function () { - it("FIXME: if the day is a sunday this not match"); - // const currentWeekNumber = require("current-week-number")(); - // const weekToShow = "Week " + currentWeekNumber; - // return app.client.waitUntilWindowLoaded() - // .getText(".clock .week").should.eventually.equal(weekToShow); + const currentWeekNumber = moment().week(); + const weekToShow = "Week " + currentWeekNumber; + return app.client.waitUntilWindowLoaded().getText(".clock .week").should.eventually.equal(weekToShow); }); });