mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
@@ -7,7 +7,7 @@ describe("Calendar module", () => {
|
||||
* @returns {boolean} result
|
||||
*/
|
||||
const doTest = async (cssClass) => {
|
||||
let elem = await helpers.getElement(`.calendar .module-content .event${cssClass}`);
|
||||
const elem = await helpers.getElement(`.calendar .module-content .event${cssClass}`);
|
||||
await expect(elem.isVisible()).resolves.toBe(true);
|
||||
return true;
|
||||
};
|
||||
@@ -42,4 +42,18 @@ describe("Calendar module", () => {
|
||||
await expect(doTest(".dayAfterTomorrow")).resolves.toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe("Exdate check", () => {
|
||||
it("should show the recurring event 51 times (excluded once) in a 364-day (inclusive) period", async () => {
|
||||
// test must run on a Thursday
|
||||
await helpers.startApplication("tests/configs/modules/calendar/exdate.js", "14 Dec 2023 12:30:00 GMT");
|
||||
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(51);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user