Add test e2e showWeek feature in spanish language.

This commit is contained in:
Rodrigo Ramírez Norambuena
2017-04-09 15:32:15 -03:00
parent ec20748594
commit 947c2e556d
3 changed files with 62 additions and 0 deletions

View File

@@ -78,4 +78,27 @@ describe("Clock set to spanish language module", function () {
.getText(".clock .time").should.eventually.match(timeRegex);
});
});
describe("with showWeek config enabled", function() {
before(function() {
// Set config sample for use in test
process.env.MM_CONFIG_FILE = "tests/configs/modules/clock/es/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 = /^Semana [0-9]{1,2}$/;
return app.client.waitUntilWindowLoaded()
.getText(".clock .week").should.eventually.match(weekRegex);
});
});
});