@@ -120,3 +120,98 @@ Feature: ocm notifications
120
120
Token: %fed_invitation_token%
121
121
ProviderDomain: %local_base_url%
122
122
"""
123
+
124
+ @issue-10718 @issue-11042
125
+ Scenario : federated user disables mail and in-app notification for "Share Removed" event
126
+ Given using server "LOCAL"
127
+ And user "Alice" has sent the following resource share invitation to federated user:
128
+ | resource | textfile .txt |
129
+ | space | Personal |
130
+ | sharee | Brian |
131
+ | shareType | user |
132
+ | permissionsRole | Viewer |
133
+ And using server "REMOTE"
134
+ When user "Brian" disables notification for the following event using the settings API:
135
+ | Share Removed | mail , in -app |
136
+ Then the HTTP status code should be "201"
137
+ And the JSON data of the response should match
138
+ """
139
+ {
140
+ "type": "object",
141
+ "required": ["value"],
142
+ "properties": {
143
+ "value": {
144
+ "type": "object",
145
+ "required": ["identifier","value"],
146
+ "properties": {
147
+ "identifier":{
148
+ "type": "object",
149
+ "required": ["extension","bundle","setting"],
150
+ "properties": {
151
+ "extension":{ "const": "ocis-accounts" },
152
+ "bundle":{ "const": "profile" },
153
+ "setting":{ "const": "event-share-removed-options" }
154
+ }
155
+ },
156
+ "value":{
157
+ "type": "object",
158
+ "required": ["id","bundleId","settingId","accountUuid","resource","collectionValue"],
159
+ "properties":{
160
+ "id":{ "pattern":"%uuidv4_pattern%" },
161
+ "bundleId":{ "pattern":"%uuidv4_pattern%" },
162
+ "settingId":{ "pattern":"%uuidv4_pattern%" },
163
+ "accountUuid":{ "pattern":"%uuidv4_pattern%" },
164
+ "resource":{
165
+ "type": "object",
166
+ "required":["type"],
167
+ "properties": {
168
+ "type":{ "const": "TYPE_USER" }
169
+ }
170
+ },
171
+ "collectionValue":{
172
+ "type": "object",
173
+ "required":["values"],
174
+ "properties": {
175
+ "values":{
176
+ "type": "array",
177
+ "maxItems": 2,
178
+ "minItems": 2,
179
+ "uniqueItems": true,
180
+ "items": {
181
+ "oneOf": [
182
+ {
183
+ "type": "object",
184
+ "required": ["key","boolValue"],
185
+ "properties": {
186
+ "key":{ "const": "mail" },
187
+ "boolValue":{ "const": false }
188
+ }
189
+ },
190
+ {
191
+ "type": "object",
192
+ "required": ["key","boolValue"],
193
+ "properties": {
194
+ "key":{ "const": "in-app" },
195
+ "boolValue":{ "const": false }
196
+ }
197
+ }
198
+ ]
199
+ }
200
+ }
201
+ }
202
+ }
203
+ }
204
+ }
205
+ }
206
+ }
207
+ }
208
+ }
209
+ """
210
+ And using server "LOCAL"
211
+ And user "Alice" has removed the access of user "Brian" from resource "textfile.txt" of space "Personal"
212
+ And using server "REMOTE"
213
+ And user "Brian" should have "1" emails
214
+ And user "Brian" should get a notification with subject "Resource shared" and message:
215
+ | message |
216
+ | Alice Hansen shared textfile .txt with you |
217
+ And user "Brian" should not have a notification related to resource "textfile.txt" with subject "Resource unshared"
0 commit comments