mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-07-03 22:36:09 +00:00
fixes #3267 AGAIN, correctly, add testcase add testcase for #3679 , broadcast clipping incorrectly I added a test module (tests/testNotification) to catch the notification and check the count. (one way to configure) i put this module in the tests folder, and added /tests to the server paths. (can't have a module in a nested folder, like tests/modules/xxx) but I have a problem. i can run the test config (MM_CONFIG_FILE), and the two modules work correctly, but in the spec runner, the calendar module times out on the broadcast test.. there is only local ics file access, no outside hosts I forced my system date to 1/1/24 (same as runner) and again the manual testcase works fine I added two test config.js,(configs/calendar) one works great (symbols) , one fails (broadcast test) I added additional delay in the calendarspec runner to try to debug the module, but it still not long enough.. no messages of trouble when I get into the browser.. BUT, this may be because of the log being turned off... (just thought of this) I created a special ICS (in mocks) that has 12 events, 1 for each month.. (so I can check clipping and broadcast) the US holidays one is sensitive to the current date, and I couldn't get it to work on 1/1/2024.. also, in general, is there a mechanism to run test:just_one_runner? waiting thru the electron test to get to one testcase.. ugh..
40 lines
733 B
JavaScript
40 lines
733 B
JavaScript
let config = {
|
|
address: "0.0.0.0",
|
|
ipWhitelist: [],
|
|
timeFormat: 12,
|
|
foreignModulesDir: "tests/mocks",
|
|
modules: [
|
|
{
|
|
module: "calendar",
|
|
position: "bottom_bar",
|
|
|
|
config: {
|
|
maximumEntries: 1,
|
|
calendars: [
|
|
{
|
|
fetchInterval: 10000, //7 * 24 * 60 * 60 * 1000,
|
|
symbol: ["calendar-check", "google"],
|
|
url: "http://localhost:8080/tests/mocks/12_events.ics"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
module: "testNotification",
|
|
position: "bottom_bar",
|
|
config: {
|
|
debug: true,
|
|
match: {
|
|
matchtype: "count",
|
|
notificationID: "CALENDAR_EVENTS"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
};
|
|
|
|
/*************** DO NOT EDIT THE LINE BELOW ***************/
|
|
if (typeof module !== "undefined") {
|
|
module.exports = config;
|
|
}
|