summaryrefslogtreecommitdiffstats
path: root/apps/dav/src
diff options
context:
space:
mode:
authorDaniel Teichmann <daniel.teichmann@das-netzwerkteam.de>2022-03-14 13:58:52 +0100
committerDaniel Teichmann <daniel.teichmann@das-netzwerkteam.de>2022-03-21 13:03:13 +0100
commitf4148820ffcbbbba9bdf9f905497ca44a023c769 (patch)
tree3cca80c7cc21eec5a5d112ff631b13f2c94ac0db /apps/dav/src
parent73a7ced1fd8cb5c7a0ee74a15890800742d1e455 (diff)
downloadnextcloud-server-f4148820ffcbbbba9bdf9f905497ca44a023c769.tar.gz
nextcloud-server-f4148820ffcbbbba9bdf9f905497ca44a023c769.zip
Add JS Unit tests for new 'sendEventRemindersToSharedGroupMembers' setting.
Signed-off-by: Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de>
Diffstat (limited to 'apps/dav/src')
-rw-r--r--apps/dav/src/views/CalDavSettings.spec.js10
-rw-r--r--apps/dav/src/views/__snapshots__/CalDavSettings.spec.js.snap30
2 files changed, 39 insertions, 1 deletions
diff --git a/apps/dav/src/views/CalDavSettings.spec.js b/apps/dav/src/views/CalDavSettings.spec.js
index 951a2802182..13abca03d5b 100644
--- a/apps/dav/src/views/CalDavSettings.spec.js
+++ b/apps/dav/src/views/CalDavSettings.spec.js
@@ -45,6 +45,7 @@ describe('CalDavSettings', () => {
sendInvitations: true,
generateBirthdayCalendar: true,
sendEventReminders: true,
+ sendEventRemindersToSharedGroupMembers: true,
sendEventRemindersPush: true,
}
},
@@ -66,6 +67,10 @@ describe('CalDavSettings', () => {
'Send notifications for events'
)
expect(sendEventReminders).toBeChecked()
+ const sendEventRemindersToSharedGroupMembers = TLUtils.getByLabelText(
+ 'Send reminder notifications to calendar sharees as well'
+ )
+ expect(sendEventRemindersToSharedGroupMembers).toBeChecked()
const sendEventRemindersPush = TLUtils.getByLabelText(
'Enable notifications for events via push'
)
@@ -107,7 +112,10 @@ describe('CalDavSettings', () => {
'sendEventReminders',
'no'
)
+
+ expect(sendEventRemindersToSharedGroupMembers).toBeDisabled()
expect(sendEventRemindersPush).toBeDisabled()
+
OCP.AppConfig.setValue.mockClear()
await userEvent.click(sendEventReminders)
expect(sendEventReminders).toBeChecked()
@@ -116,6 +124,8 @@ describe('CalDavSettings', () => {
'sendEventReminders',
'yes'
)
+
+ expect(sendEventRemindersToSharedGroupMembers).toBeEnabled()
expect(sendEventRemindersPush).toBeEnabled()
})
})
diff --git a/apps/dav/src/views/__snapshots__/CalDavSettings.spec.js.snap b/apps/dav/src/views/__snapshots__/CalDavSettings.spec.js.snap
index 469cd2f07eb..448361297fb 100644
--- a/apps/dav/src/views/__snapshots__/CalDavSettings.spec.js.snap
+++ b/apps/dav/src/views/__snapshots__/CalDavSettings.spec.js.snap
@@ -126,7 +126,35 @@ exports[`CalDavSettings interactions 1`] = `
</em>
</p>
- <p>
+ <p
+ class="indented"
+ >
+ <input
+ class="checkbox"
+ id="caldavSendEventRemindersToSharedGroupMembers"
+ type="checkbox"
+ />
+
+ <label
+ for="caldavSendEventRemindersToSharedGroupMembers"
+ >
+
+ Send reminder notifications to calendar sharees as well
+
+ </label>
+
+ <br />
+
+ <em>
+
+ Reminders are always sent to organizers and attendees.
+
+ </em>
+ </p>
+
+ <p
+ class="indented"
+ >
<input
class="checkbox"
id="caldavSendEventRemindersPush"