mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-22 05:07:05 +00:00
add fix for sliceMultiDayEvents (#3543)
sliceMultiDayEvents occasionally gets the number of events wrong and produces too many rows Math.ceil() rounds up over 1.04 so we get an abnormal count then the calcs for the midnight loop control used different moment() functions, producing different results fixes #3542
This commit is contained in:
@@ -129,4 +129,22 @@ describe("Calendar module", () => {
|
||||
await expect(doTestCount()).resolves.toBe(2);
|
||||
});
|
||||
});
|
||||
|
||||
/*
|
||||
* RRULE TESTS:
|
||||
* Add any tests that check rrule functionality here.
|
||||
*/
|
||||
describe("sliceMultiDayEvents", () => {
|
||||
it("Issue #3452 split multiday in Europe", async () => {
|
||||
await helpers.startApplication("tests/configs/modules/calendar/sliceMultiDayEvents.js", "01 Sept 2024 10:38:00 GMT+02:00", ["js/electron.js"], "Europe/Berlin");
|
||||
expect(global.page).not.toBeNull();
|
||||
const loc = await global.page.locator(".calendar .event");
|
||||
const elem = loc.first();
|
||||
await elem.waitFor();
|
||||
expect(elem).not.toBeNull();
|
||||
const cnt = await loc.count();
|
||||
expect(cnt).toBe(6);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user