@@ -4,13 +4,17 @@ 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
+ Background :
8
+ Given user "Alice" has been created with default attributes
9
+ And using server "REMOTE"
10
+ And user "Brian" has been created with default attributes
11
+
7
12
8
13
Scenario : federated user disables mail and in-app notification for "Share Received" event
9
- Given user "Alice" has been created with default attributes
14
+ Given using server "LOCAL"
10
15
And user "Alice" has uploaded file with content "ocm test" to "textfile.txt"
11
16
And "Alice" has created the federation share invitation
12
17
And using server "REMOTE"
13
- And user "Brian" has been created with default attributes
14
18
And "Brian" has accepted invitation
15
19
When user "Brian" disables notification for the following events using the settings API:
16
20
| Share Received | mail ,in -app |
@@ -100,3 +104,62 @@ Feature: ocm notifications
100
104
Then the HTTP status code should be "200"
101
105
And the notifications should be empty
102
106
And user "Brian" should have "0" emails
107
+
108
+
109
+ Scenario : federated user disables email notification
110
+ Given using server "LOCAL"
111
+ And user "Alice" has uploaded file with content "ocm test" to "textfile.txt"
112
+ And "Alice" has created the federation share invitation
113
+ And using server "REMOTE"
114
+ And "Brian" has accepted invitation
115
+ When user "Brian" disables email notification using the settings API
116
+ Then the HTTP status code should be "201"
117
+ And the JSON data of the response should match
118
+ """
119
+ {
120
+ "type": "object",
121
+ "required": ["value"],
122
+ "properties": {
123
+ "value": {
124
+ "type": "object",
125
+ "required": ["identifier","value"],
126
+ "properties": {
127
+ "identifier":{
128
+ "type": "object",
129
+ "required": ["extension","bundle","setting"],
130
+ "properties": {
131
+ "extension":{ "const": "ocis-accounts" },
132
+ "bundle":{ "const": "profile" },
133
+ "setting":{ "const": "disable-email-notifications" }
134
+ }
135
+ },
136
+ "value":{
137
+ "type": "object",
138
+ "required": ["id","bundleId","settingId","accountUuid","resource"],
139
+ "properties":{
140
+ "id":{ "pattern": "%uuidv4_pattern%" },
141
+ "bundleId":{ "pattern":"%uuidv4_pattern%" },
142
+ "settingId":{ "pattern":"%uuidv4_pattern%" },
143
+ "accountUuid":{ "pattern":"%uuidv4_pattern%" },
144
+ "resource":{
145
+ "type": "object",
146
+ "required":["type"],
147
+ "properties": {
148
+ "type":{ "const": "TYPE_USER" }
149
+ }
150
+ }
151
+ }
152
+ }
153
+ }
154
+ }
155
+ }
156
+ }
157
+ """
158
+ And using server "LOCAL"
159
+ And user "Alice" has sent the following resource share invitation to federated user:
160
+ | resource | textfile .txt |
161
+ | space | Personal |
162
+ | sharee | Brian |
163
+ | shareType | user |
164
+ | permissionsRole | Viewer |
165
+ And user "Brian" should have "0" emails
0 commit comments