@@ -4,14 +4,16 @@ Feature: ocm notifications
4
4
I want to manage my notification settings
5
5
So that I do not get notified of unimportant events
6
6
7
-
8
- Scenario : federated user disables mail and in-app notification for "Share Received" event
7
+ Background :
9
8
Given user "Alice" has been created with default attributes
10
- And user "Alice" has uploaded file with content "ocm test" to "textfile.txt"
11
9
And "Alice" has created the federation share invitation
10
+ And user "Alice" has uploaded file with content "ocm test" to "textfile.txt"
12
11
And using server "REMOTE"
13
12
And user "Brian" has been created with default attributes
14
13
And "Brian" has accepted invitation
14
+
15
+
16
+ Scenario : federated user disables mail and in-app notification for "Share Received" event
15
17
When user "Brian" disables notification for the following events using the settings API:
16
18
| Share Received | mail ,in -app |
17
19
Then the HTTP status code should be "201"
@@ -100,3 +102,98 @@ Feature: ocm notifications
100
102
Then the HTTP status code should be "200"
101
103
And the notifications should be empty
102
104
And user "Brian" should have "0" emails
105
+
106
+ @issue-10718 @issue-11042
107
+ Scenario : federated user disables mail and in-app notification for "Share Removed" event
108
+ Given using server "LOCAL"
109
+ And user "Alice" has sent the following resource share invitation to federated user:
110
+ | resource | textfile .txt |
111
+ | space | Personal |
112
+ | sharee | Brian |
113
+ | shareType | user |
114
+ | permissionsRole | Viewer |
115
+ And using server "REMOTE"
116
+ When user "Brian" disables notification for the following events using the settings API:
117
+ | Share Removed | mail , in -app |
118
+ Then the HTTP status code should be "201"
119
+ And the JSON data of the response should match
120
+ """
121
+ {
122
+ "type": "object",
123
+ "required": ["value"],
124
+ "properties": {
125
+ "value": {
126
+ "type": "object",
127
+ "required": ["identifier","value"],
128
+ "properties": {
129
+ "identifier":{
130
+ "type": "object",
131
+ "required": ["extension","bundle","setting"],
132
+ "properties": {
133
+ "extension":{ "const": "ocis-accounts" },
134
+ "bundle":{ "const": "profile" },
135
+ "setting":{ "const": "event-share-removed-options" }
136
+ }
137
+ },
138
+ "value":{
139
+ "type": "object",
140
+ "required": ["id","bundleId","settingId","accountUuid","resource","collectionValue"],
141
+ "properties":{
142
+ "id":{ "pattern":"%uuidv4_pattern%" },
143
+ "bundleId":{ "pattern":"%uuidv4_pattern%" },
144
+ "settingId":{ "pattern":"%uuidv4_pattern%" },
145
+ "accountUuid":{ "pattern":"%uuidv4_pattern%" },
146
+ "resource":{
147
+ "type": "object",
148
+ "required":["type"],
149
+ "properties": {
150
+ "type":{ "const": "TYPE_USER" }
151
+ }
152
+ },
153
+ "collectionValue":{
154
+ "type": "object",
155
+ "required":["values"],
156
+ "properties": {
157
+ "values":{
158
+ "type": "array",
159
+ "maxItems": 2,
160
+ "minItems": 2,
161
+ "uniqueItems": true,
162
+ "items": {
163
+ "oneOf": [
164
+ {
165
+ "type": "object",
166
+ "required": ["key","boolValue"],
167
+ "properties": {
168
+ "key":{ "const": "mail" },
169
+ "boolValue":{ "const": false }
170
+ }
171
+ },
172
+ {
173
+ "type": "object",
174
+ "required": ["key","boolValue"],
175
+ "properties": {
176
+ "key":{ "const": "in-app" },
177
+ "boolValue":{ "const": false }
178
+ }
179
+ }
180
+ ]
181
+ }
182
+ }
183
+ }
184
+ }
185
+ }
186
+ }
187
+ }
188
+ }
189
+ }
190
+ }
191
+ """
192
+ And using server "LOCAL"
193
+ And user "Alice" has removed the access of user "Brian" from resource "textfile.txt" of space "Personal"
194
+ And using server "REMOTE"
195
+ And user "Brian" should have "1" emails
196
+ And user "Brian" should get a notification with subject "Resource shared" and message:
197
+ | message |
198
+ | Alice Hansen shared textfile .txt with you |
199
+ And user "Brian" should not have a notification related to resource "textfile.txt" with subject "Resource unshared"
0 commit comments