mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 03:39:55 +00:00
iterate over timezones
This commit is contained in:
parent
a954a62762
commit
5d8f2f5da1
@ -68,14 +68,27 @@ describe("Calendar module", function () {
|
|||||||
it("should show the recurring birthday event 6 times", () => {
|
it("should show the recurring birthday event 6 times", () => {
|
||||||
testElementLength(".calendar .event", 6);
|
testElementLength(".calendar .event", 6);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should contain text "Mar 25th"', () => {
|
|
||||||
const elem = document.querySelector(".calendar");
|
|
||||||
expect(elem).not.toBe(null);
|
|
||||||
expect(elem.textContent).toContain("Mar 25th");
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
process.setMaxListeners(0);
|
||||||
|
for (let i = -12; i < 12; i++) {
|
||||||
|
describe("Recurring event per timezone", function () {
|
||||||
|
beforeAll(function (done) {
|
||||||
|
Date.prototype.getTimezoneOffset = function () {
|
||||||
|
return i * 60;
|
||||||
|
};
|
||||||
|
helpers.startApplication("tests/configs/modules/calendar/recurring.js");
|
||||||
|
helpers.getDocument(done, 3000);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should contain text "Mar 25th" in timezone UTC ' + -i, () => {
|
||||||
|
const elem = document.querySelector(".calendar");
|
||||||
|
expect(elem).not.toBe(null);
|
||||||
|
expect(elem.textContent).toContain("Mar 25th");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
describe("Changed port", function () {
|
describe("Changed port", function () {
|
||||||
beforeAll(function (done) {
|
beforeAll(function (done) {
|
||||||
helpers.startApplication("tests/configs/modules/calendar/changed-port.js");
|
helpers.startApplication("tests/configs/modules/calendar/changed-port.js");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user