-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixcaldates2 fix calendar module date processing, using [email protected] #3587
Conversation
I can't create the timeout on 20.x electron test
|
getting the same error ... chicago late in timezone
✕ Issue #unknown rrule US close to timezone edge (20080 ms)
● Calendar module › chicago late in timezone › Issue #unknown rrule US close to timezone edge
thrown: "Exceeded timeout of 20000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."
178 |
179 | describe("chicago late in timezone", () => {
> 180 | it("Issue #unknown rrule US close to timezone edge", async () => {
| ^
181 | await helpers.startApplication("tests/configs/modules/calendar/chicago_late_in_timezone.js", "01 Sept 2024 10:38:00 GMT-5:00", ["js/electron.js"], "America/Chicago");
182 | await expect(doTestTableContent(".calendar .event", ".time", "10th.Sep, 20:15")).resolves.toBe(true);
183 | });
at it (tests/electron/modules/calendar_spec.js:180:3)
at describe (tests/electron/modules/calendar_spec.js:179:2)
at Object.describe (tests/electron/modules/calendar_spec.js:3:1) |
yeh. thats not the real error. something has made it fail (variable, coding) but i don't see anything locally only diff is i added logLevel to this js testcase, but logs are nooped in test runs |
removed the logLevel config.js setting for chicago test.. |
anyone have ideas how to see the stdout/err during the jest run? i cannot recreate this |
node@89788bc75cde:/opt/magic_mirror$ cat tests/configs/modules/calendar/chicago_late_in_timezone.js
let config = {
timeFormat: 24,
modules: [
{
module: "calendar",
position: "bottom_bar",
config: {
fade: false,
urgency: 0,
dateFormat: "Do.MMM, HH:mm",
fullDayEventDateFormat: "Do.MMM",
timeFormat: "absolute",
getRelative: 0,
maximumNumberOfDays: 20,
calendars: [
{
maximumEntries: 100,
//url: "http://localhost:8080/tests/mocks/chicago_late_in_timezone.ics"
url: "http://localhost:8080/modules/default/calendar/chicago_late_in_timezone.ics"
}
]
}
}
]
}; the referenced file By the way, the new test config's are missing the lines |
thx |
but, how did you see that |
fixed those |
…f timezone viewing
So, the testcase that is failing here is due to the fact that today+6 months gets April 9 in view of the repeating rule because the code does ==>now<===+maximumNumberOfDay(10000) for the end date of between but that implies that the systemdate in the testcase didn't execute in the helper await helpers.startApplication("tests/configs/modules/calendar/show-duplicates-in-calendar.js", "15 Sep 2024
12:30:00 GMT"); helper code
if I add this date setting to the testcase .js itself, it works..
how do we want to fix this testcase? |
last successful run at — Today at 2:57 AM (my time? us central) on merge of the compliments update my update at 8:45 for calendar failed. |
what is the test system date and timezone? if the event filter (calendarfetcherutils) really returned a bad date/time value (Ends in Invalid date) but logging is turned off by test, so I can't get that the elecrton tests set different dates and timezones.. from US west coast to Australia. |
ok, found it, TZ = UTC I 'fixed' a lint error
lint error I fixed it wrong, corrected now.. the array set if not parsed needs 3 elements. |
ok, ready to merge... no additional testers have found anything, or commited to finish testing. this will close pr #3622 as not needed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostyl small nitpicking things...
here is an updated test version of the fixes for all kinds of calendar date problems.
NOTE: the changed branch name
NOTE: this used the [email protected] library UNCHANGED
best to make a new folder and git clone there
git clone https://github.com/sdetweil/MagicMirror
cd MagicMirror
git checkout fixcaldates2 // <------ note this is a changed branch name
npm run install-mm
copy your config.js and custom.css from the prior folder
and the non-default modules you have installed…
this ONLY changes the default calendar
but DOES ship an updated node-ical library too
if you need to fall back, just rename the folders around again so that
your original is called MagicMirror
all the testcases for node-ical and MagicMirror execute successfully.
the ‘BIG’ change here is to get the local NON-TZ dates for the
rrule.between()
all the checking and conversion code is commented out or not used
the node-ical fixes are for excluded dates (exdate) values being adjusted for DST/STD time… waiting to submit that PR
one fix in calendar.js for checking if a past date was too far back,
but it never checked to see IF the event date was in the past… (before today) so it chopped off too many
and one change in calendarfetcher.js to put out a better diagnostic message of the parsed data… (exdate was excluded cause JSON stringify couldn’t convert the complex structure)
I added the tests you all have documented
please re-pull and checkout the new branch (I deleted the old branch)
and npm run install-mm again