mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Add test data
This commit is contained in:
parent
b31c2a6264
commit
40c1521591
37
tests/configs/data/calendar_test_recurring.ics
Normal file
37
tests/configs/data/calendar_test_recurring.ics
Normal file
@ -0,0 +1,37 @@
|
||||
BEGIN:VCALENDAR
|
||||
PRODID:-//Google Inc//Google Calendar 70.9054//EN
|
||||
VERSION:2.0
|
||||
CALSCALE:GREGORIAN
|
||||
METHOD:PUBLISH
|
||||
X-WR-CALNAME:xxx@gmail.com
|
||||
X-WR-TIMEZONE:Europe/Zurich
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:Etc/UTC
|
||||
X-LIC-LOCATION:Etc/UTC
|
||||
BEGIN:STANDARD
|
||||
TZOFFSETFROM:+0000
|
||||
TZOFFSETTO:+0000
|
||||
TZNAME:GMT
|
||||
DTSTART:19700101T00000--äüüßßß-0
|
||||
END:STANDARD
|
||||
END:VTIMEZONE
|
||||
BEGIN:VEVENT
|
||||
DTSTART;VALUE=DATE:20210325
|
||||
DTEND;VALUE=DATE:20210326
|
||||
RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTHDAY=25
|
||||
DTSTAMP:20210421T154106Z
|
||||
UID:zzz@google.com
|
||||
REATED:20200831T200244Z
|
||||
DESCRIPTION:
|
||||
LAST-MODIFIED:20200831T200244Z
|
||||
LOCATION:
|
||||
SEQUENCE:0
|
||||
STATUS:CONFIRMED
|
||||
SUMMARY:Birthday
|
||||
TRANSP:OPAQUE
|
||||
BEGIN:VALARM
|
||||
ACTION:DISPLAY
|
||||
DESCRIPTION:This is an event reminder
|
||||
TRIGGER:-P0DT7H0M0S
|
||||
END:VALARM
|
||||
END:VEVENT
|
43
tests/configs/modules/calendar/recurring.js
Normal file
43
tests/configs/modules/calendar/recurring.js
Normal file
@ -0,0 +1,43 @@
|
||||
/* Magic Mirror Test config custom calendar
|
||||
*
|
||||
* By Rejas
|
||||
* MIT Licensed.
|
||||
*/
|
||||
let config = {
|
||||
port: 8080,
|
||||
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
|
||||
|
||||
language: "en",
|
||||
timeFormat: 12,
|
||||
units: "metric",
|
||||
electronOptions: {
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
enableRemoteModule: true
|
||||
}
|
||||
},
|
||||
|
||||
modules: [
|
||||
{
|
||||
module: "calendar",
|
||||
position: "bottom_bar",
|
||||
config: {
|
||||
calendars: [
|
||||
{
|
||||
maximumEntries: 4,
|
||||
maximumNumberOfDays: 10000,
|
||||
symbol: "birthday-cake",
|
||||
fullDaySymbol: "calendar-day",
|
||||
recurringSymbol: "undo",
|
||||
url: "http://localhost:8080/tests/configs/data/calendar_test_recurring.ics"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
/*************** DO NOT EDIT THE LINE BELOW ***************/
|
||||
if (typeof module !== "undefined") {
|
||||
module.exports = config;
|
||||
}
|
@ -76,6 +76,20 @@ describe("Calendar module", function () {
|
||||
});
|
||||
});
|
||||
|
||||
describe("Recurring event", function () {
|
||||
before(function () {
|
||||
// Set config sample for use in test
|
||||
process.env.MM_CONFIG_FILE = "tests/configs/modules/calendar/recurring.js";
|
||||
});
|
||||
|
||||
it("should something correct", async () => {
|
||||
// TODO add real test case
|
||||
await app.client.waitUntilTextExists(".calendar", "TestEvent", 10000);
|
||||
const events = await app.client.$$(".calendar .event");
|
||||
return expect(events.length).equals(4);
|
||||
});
|
||||
});
|
||||
|
||||
describe("Changed port", function () {
|
||||
before(function () {
|
||||
serverBasicAuth.listen(8010);
|
||||
|
Loading…
x
Reference in New Issue
Block a user