one calendar test fails since today
● Calendar module › exdate check › should show the recurring event 51 times (excluded once) in a 364-day (inclusive) period
expect(received).resolves.toBe()
Received promise rejected instead of resolved
Rejected to value: [Error: expect(received).toHaveLength(expected)·
Expected length: 51
Received length: 50
Received object: [<tr class="event-wrapper normal event"><td class="symbol align-right "><span class="fas fa-fw fa-calendar-alt" /></td><td class="title bright ">My Event</td><td class="time light ">Dec 20th</td></tr>, <tr class="event-wrapper normal event"><td class="symbol align-right "><span class="fas fa-fw fa-calendar-alt" /></td><td class="title bright ">My Event</td><td class="time light ">Dec 27th</td></tr>, <tr class="event-wrapper normal event"><td class="symbol align-right "><span class="fas fa-fw fa-calendar-alt" /></td><td class="title bright ">My Event</td><td class="time light ">Jan 3rd</td></tr>, <tr class="event-wrapper normal event"><td class="symbol align-right "><span class="fas fa-fw fa-calendar-alt" /></td><td class="title bright ">My Event</td><td class="time light ">Jan 10th</td></tr>, <tr class="event-wrapper normal event"><td class="symbol align-right "><span class="fas fa-fw fa-calendar-alt" /></td><td class="title bright ">My Event</td><td class="time light ">Jan 17th</td></tr>, <tr class="event-wrapper normal event"><td class="symbol align-right "><span class="fas fa-fw fa-calendar-alt" /></td><td class="title bright ">My Event</td><td class="time light ">Jan 24th</td></tr>, <tr class="event-wrapper normal event"><td class="symbol align-right "><span class="fas fa-fw fa-calendar-alt" /></td><td class="title bright ">My Event</td><td class="time light ">Jan 31st</td></tr>, <tr class="event-wrapper normal event"><td class="symbol align-right "><span class="fas fa-fw fa-calendar-alt" /></td><td class="title bright ">My Event</td><td class="time light ">Feb 7th</td></tr>, <tr class="event-wrapper normal event"><td class="symbol align-right "><span class="fas fa-fw fa-calendar-alt" /></td><td class="title bright ">My Event</td><td class="time light ">Feb 14th</td></tr>, <tr class="event-wrapper normal event"><td class="symbol align-right "><span class="fas fa-fw fa-calendar-alt" /></td><td class="title bright ">My Event</td><td class="time light ">Feb 21st</td></tr>, …]]
95 |
96 | it("should show the recurring event 51 times (excluded once) in a 364-day (inclusive) period", async () => {
> 97 | await expect(testElementLength(".calendar .event", 51)).resolves.toBe(true);
| ^
98 | });
99 | });
100 |
at expect (node_modules/expect/build/index.js:113:15)
at Object.expect (tests/e2e/modules/calendar_spec.js:97:10)
I was able to fake the date in my test container:
- running with a date before today: test succeeds
- running with a date of today or later: test fails
I think this has something to do with the data used in tests/mocks/calendar_test_exdate.ics.
So I think we should remove the test until someone has an idea to fix it.
maybe the original author @jkriegshauser can help us out witrh a fix?
@rejas I'll try to take a look when i get some time. I've noticed issues since Los_Angeles timezone went off DST. I still highly suspect the rrule js module since there are hacks around making it work.
Digging into this it seems the test still depends on the timezone used.
With setting the timezone to UTC before running the tests it seems to work. Will provide a PR and we will see if this fix is sufficent.
this test still fails sometimes, seems to be time dependent
FAIL tests/electron/modules/calendar_spec.js (12.048 s)
● Calendar module › Exdate check › should show the recurring event 51 times (excluded once) in a 364-day (inclusive) period
expect(received).toBe(expected) // Object.is equality
Expected: 51
Received: 50
55 | expect(elem).not.toBeNull();
56 | const cnt = await loc.count();
> 57 | expect(cnt).toBe(51);
| ^
58 | });
59 | });
60 | });
at Object.toBe (tests/electron/modules/calendar_spec.js:57:16)
Yep, something is still funky in the latest release. I had an event show up on MM today that was deleted (in exdate). I'll look into it
I am not sure this is related, but it would seem to fit the failure. I am seeing two different recurring meetings where I have events listed for all future dates, but not the original date. For example, I have an event set to recur every 2nd Wednesday starting January 10th. I don't see it on the 10th, but I do see it on all subsequent 2nd Wednesdays through the rest of the year.
I think I know what it is. I’m looking into it.
On Sun, Jan 7, 2024 at 10:50 AM Jeff Cain @.***> wrote:
I am not sure this is related, but it would seem to fit the failure. I am seeing two different recurring meetings where I have events listed for all future dates, but not the original date. For example, I have an event set to recur every 2nd Wednesday starting January 10th. I don't see it on the 10th, but I do see it on all subsequent 2nd Wednesdays through the rest of the year.
— Reply to this email directly, view it on GitHub https://github.com/MagicMirrorOrg/MagicMirror/issues/3291#issuecomment-1880140302, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM6MX5XAYFANNN6VPGXXVLYNLU5RAVCNFSM6AAAAABAT3PSJ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBQGE2DAMZQGI . You are receiving this because you were mentioned.Message ID: @.***>