Add test for changing the calendar symbol

This commit is contained in:
rejas
2020-07-18 21:10:36 +02:00
parent 73aa35ea2c
commit 8b1d1671f7
3 changed files with 21 additions and 6 deletions

View File

@@ -22,6 +22,7 @@ let config = {
config: {
calendars: [
{
symbol: "birthday-cake",
maximumEntries: 3,
maximumNumberOfDays: 10000,
url: "http://localhost:8080/tests/configs/data/calendar_test.ics"

View File

@@ -37,6 +37,12 @@ describe("Calendar module", function () {
const events = await app.client.$$(".calendar .event");
return expect(events.length).equals(10);
});
it("Should show the default calendar symbol in each event", async () => {
await app.client.waitUntilTextExists(".calendar", "TestEvent", 10000);
const icons = await app.client.$$(".calendar .event .fa-calendar");
return expect(icons.length).not.equals(0);
});
});
describe("Custom configuration", function () {
@@ -50,6 +56,12 @@ describe("Calendar module", function () {
const events = await app.client.$$(".calendar .event");
return expect(events.length).equals(3);
});
it("Should show the custom calendar symbol in each event", async () => {
await app.client.waitUntilTextExists(".calendar", "TestEvent", 10000);
const icons = await app.client.$$(".calendar .event .fa-birthday-cake");
return expect(icons.length).not.equals(0);
});
});
describe("Basic auth", function () {