@@ -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
9
And user "Alice" has uploaded file with content "ocm test" to "textfile.txt"
11
10
And "Alice" has created the federation share invitation
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,57 @@ 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
+
107
+ Scenario : federated user disables email notification
108
+ When user "Brian" disables email notification using the settings API
109
+ Then the HTTP status code should be "201"
110
+ And the JSON data of the response should match
111
+ """
112
+ {
113
+ "type": "object",
114
+ "required": ["value"],
115
+ "properties": {
116
+ "value": {
117
+ "type": "object",
118
+ "required": ["identifier","value"],
119
+ "properties": {
120
+ "identifier":{
121
+ "type": "object",
122
+ "required": ["extension","bundle","setting"],
123
+ "properties": {
124
+ "extension":{ "const": "ocis-accounts" },
125
+ "bundle":{ "const": "profile" },
126
+ "setting":{ "const": "disable-email-notifications" }
127
+ }
128
+ },
129
+ "value":{
130
+ "type": "object",
131
+ "required": ["id","bundleId","settingId","accountUuid","resource"],
132
+ "properties":{
133
+ "id":{ "pattern": "%uuidv4_pattern%" },
134
+ "bundleId":{ "pattern":"%uuidv4_pattern%" },
135
+ "settingId":{ "pattern":"%uuidv4_pattern%" },
136
+ "accountUuid":{ "pattern":"%uuidv4_pattern%" },
137
+ "resource":{
138
+ "type": "object",
139
+ "required":["type"],
140
+ "properties": {
141
+ "type":{ "const": "TYPE_USER" }
142
+ }
143
+ }
144
+ }
145
+ }
146
+ }
147
+ }
148
+ }
149
+ }
150
+ """
151
+ And using server "LOCAL"
152
+ And user "Alice" has sent the following resource share invitation to federated user:
153
+ | resource | textfile .txt |
154
+ | space | Personal |
155
+ | sharee | Brian |
156
+ | shareType | user |
157
+ | permissionsRole | Viewer |
158
+ And user "Brian" should have "0" emails
0 commit comments