Merge pull request #2753 from khassel/calendar-test

This commit is contained in:
Michael Teeuw 2021-12-29 09:13:11 +01:00 committed by GitHub
commit 01010fe795
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 0 deletions

View File

@ -11,6 +11,8 @@ _This release is scheduled to be released on 2022-01-01._
### Added
- Added test for calendar recurring event with checks the correct date displayed (related to #2752).
### Updated
- ESLint version supports now ECMAScript 2018

View File

@ -70,6 +70,25 @@ describe("Calendar module", function () {
});
});
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 () {
beforeAll(function (done) {
helpers.startApplication("tests/configs/modules/calendar/changed-port.js");