-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Worked around several issues in the RRULE library that were causing deleted calender events to still show, some initial and recurring events to not show, and some event times to be off an hour. (#3291) * Renamed variables in *calendarfetcherutils.js* to be more clear about use of `moment` and js's `Date` class. * Added calendar config option `forceUseCurrentTime` (default:`false`) which will ignore overridden `Date.now` in the config in order to keep some tests consistent. * Added several unit tests for crossing DST in different timezones with excluded events.
- Loading branch information
1 parent
27f3c86
commit 7f0b8e4
Showing
20 changed files
with
528 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
tests/configs/modules/calendar/exdate_la_at_midnight_dst.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* MagicMirror² Test calendar exdate | ||
* | ||
* By jkriegshauser | ||
* MIT Licensed. | ||
* | ||
* See issue #3250 | ||
* See tests/electron/modules/calendar_spec.js | ||
*/ | ||
let config = { | ||
timeFormat: 12, | ||
|
||
modules: [ | ||
{ | ||
module: "calendar", | ||
position: "bottom_bar", | ||
config: { | ||
maximumEntries: 100, | ||
calendars: [ | ||
{ | ||
maximumEntries: 100, | ||
maximumNumberOfDays: 28, // 4 weeks, 2 of which are skipped | ||
url: "http://localhost:8080/tests/mocks/exdate_la_at_midnight_dst.ics" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}; | ||
|
||
Date.now = () => { | ||
return new Date("19 Oct 2023 12:30:00 GMT-07:00").valueOf(); | ||
}; | ||
|
||
/*************** DO NOT EDIT THE LINE BELOW ***************/ | ||
if (typeof module !== "undefined") { | ||
module.exports = config; | ||
} |
37 changes: 37 additions & 0 deletions
37
tests/configs/modules/calendar/exdate_la_at_midnight_std.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* MagicMirror² Test calendar exdate | ||
* | ||
* By jkriegshauser | ||
* MIT Licensed. | ||
* | ||
* See issue #3250 | ||
* See tests/electron/modules/calendar_spec.js | ||
*/ | ||
let config = { | ||
timeFormat: 12, | ||
|
||
modules: [ | ||
{ | ||
module: "calendar", | ||
position: "bottom_bar", | ||
config: { | ||
maximumEntries: 100, | ||
calendars: [ | ||
{ | ||
maximumEntries: 100, | ||
maximumNumberOfDays: 28, // 4 weeks, 2 of which are skipped | ||
url: "http://localhost:8080/tests/mocks/exdate_la_at_midnight_std.ics" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}; | ||
|
||
Date.now = () => { | ||
return new Date("19 Oct 2023 12:30:00 GMT-07:00").valueOf(); | ||
}; | ||
|
||
/*************** DO NOT EDIT THE LINE BELOW ***************/ | ||
if (typeof module !== "undefined") { | ||
module.exports = config; | ||
} |
37 changes: 37 additions & 0 deletions
37
tests/configs/modules/calendar/exdate_la_before_midnight.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* MagicMirror² Test calendar exdate | ||
* | ||
* By jkriegshauser | ||
* MIT Licensed. | ||
* | ||
* See issue #3250 | ||
* See tests/electron/modules/calendar_spec.js | ||
*/ | ||
let config = { | ||
timeFormat: 12, | ||
|
||
modules: [ | ||
{ | ||
module: "calendar", | ||
position: "bottom_bar", | ||
config: { | ||
maximumEntries: 100, | ||
calendars: [ | ||
{ | ||
maximumEntries: 100, | ||
maximumNumberOfDays: 28, // 4 weeks, 2 of which are skipped | ||
url: "http://localhost:8080/tests/mocks/exdate_la_before_midnight.ics" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}; | ||
|
||
Date.now = () => { | ||
return new Date("19 Oct 2023 12:30:00 GMT-07:00").valueOf(); | ||
}; | ||
|
||
/*************** DO NOT EDIT THE LINE BELOW ***************/ | ||
if (typeof module !== "undefined") { | ||
module.exports = config; | ||
} |
37 changes: 37 additions & 0 deletions
37
tests/configs/modules/calendar/exdate_syd_at_midnight_dst.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* MagicMirror² Test calendar exdate | ||
* | ||
* By jkriegshauser | ||
* MIT Licensed. | ||
* | ||
* See issue #3250 | ||
* See tests/electron/modules/calendar_spec.js | ||
*/ | ||
let config = { | ||
timeFormat: 12, | ||
|
||
modules: [ | ||
{ | ||
module: "calendar", | ||
position: "bottom_bar", | ||
config: { | ||
maximumEntries: 100, | ||
calendars: [ | ||
{ | ||
maximumEntries: 100, | ||
maximumNumberOfDays: 28, // 4 weeks, 2 of which are skipped | ||
url: "http://localhost:8080/tests/mocks/exdate_syd_at_midnight_dst.ics" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}; | ||
|
||
Date.now = () => { | ||
return new Date("14 Sep 2023 12:30:00 GMT+10:00").valueOf(); | ||
}; | ||
|
||
/*************** DO NOT EDIT THE LINE BELOW ***************/ | ||
if (typeof module !== "undefined") { | ||
module.exports = config; | ||
} |
37 changes: 37 additions & 0 deletions
37
tests/configs/modules/calendar/exdate_syd_at_midnight_std.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* MagicMirror² Test calendar exdate | ||
* | ||
* By jkriegshauser | ||
* MIT Licensed. | ||
* | ||
* See issue #3250 | ||
* See tests/electron/modules/calendar_spec.js | ||
*/ | ||
let config = { | ||
timeFormat: 12, | ||
|
||
modules: [ | ||
{ | ||
module: "calendar", | ||
position: "bottom_bar", | ||
config: { | ||
maximumEntries: 100, | ||
calendars: [ | ||
{ | ||
maximumEntries: 100, | ||
maximumNumberOfDays: 28, // 4 weeks, 2 of which are skipped | ||
url: "http://localhost:8080/tests/mocks/exdate_syd_at_midnight_std.ics" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}; | ||
|
||
Date.now = () => { | ||
return new Date("14 Sep 2023 12:30:00 GMT+10:00").valueOf(); | ||
}; | ||
|
||
/*************** DO NOT EDIT THE LINE BELOW ***************/ | ||
if (typeof module !== "undefined") { | ||
module.exports = config; | ||
} |
37 changes: 37 additions & 0 deletions
37
tests/configs/modules/calendar/exdate_syd_before_midnight.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* MagicMirror² Test calendar exdate | ||
* | ||
* By jkriegshauser | ||
* MIT Licensed. | ||
* | ||
* See issue #3250 | ||
* See tests/electron/modules/calendar_spec.js | ||
*/ | ||
let config = { | ||
timeFormat: 12, | ||
|
||
modules: [ | ||
{ | ||
module: "calendar", | ||
position: "bottom_bar", | ||
config: { | ||
maximumEntries: 100, | ||
calendars: [ | ||
{ | ||
maximumEntries: 100, | ||
maximumNumberOfDays: 28, // 4 weeks, 2 of which are skipped | ||
url: "http://localhost:8080/tests/mocks/exdate_syd_before_midnight.ics" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}; | ||
|
||
Date.now = () => { | ||
return new Date("14 Sep 2023 12:30:00 GMT+10:00").valueOf(); | ||
}; | ||
|
||
/*************** DO NOT EDIT THE LINE BELOW ***************/ | ||
if (typeof module !== "undefined") { | ||
module.exports = config; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.