Skip to content

Commit a646184

Browse files
test: add test to disable email notification by federated user
Signed-off-by: prashant-gurung899 <prasantgrg777@gmail.com>
1 parent ac1689b commit a646184

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
@ocm @notification
2+
Feature: ocm notifications
3+
As a user
4+
I want to manage my notification settings
5+
So that I do not get notified of unimportant events
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+
12+
@email
13+
Scenario: federated user disables email notification
14+
Given using server "LOCAL"
15+
And user "Alice" has uploaded file with content "ocm test" to "textfile.txt"
16+
And "Alice" has created the federation share invitation
17+
And using server "REMOTE"
18+
And "Brian" has accepted invitation
19+
When user "Brian" disables email notification using the settings API
20+
Then the HTTP status code should be "201"
21+
And the JSON data of the response should match
22+
"""
23+
{
24+
"type": "object",
25+
"required": ["value"],
26+
"properties": {
27+
"value": {
28+
"type": "object",
29+
"required": ["identifier","value"],
30+
"properties": {
31+
"identifier":{
32+
"type": "object",
33+
"required": ["extension","bundle","setting"],
34+
"properties": {
35+
"extension":{ "const": "ocis-accounts" },
36+
"bundle":{ "const": "profile" },
37+
"setting":{ "const": "disable-email-notifications" }
38+
}
39+
},
40+
"value":{
41+
"type": "object",
42+
"required": ["id","bundleId","settingId","accountUuid","resource"],
43+
"properties":{
44+
"id":{ "pattern": "%uuidv4_pattern%" },
45+
"bundleId":{ "pattern":"%uuidv4_pattern%" },
46+
"settingId":{ "pattern":"%uuidv4_pattern%" },
47+
"accountUuid":{ "pattern":"%uuidv4_pattern%" },
48+
"resource":{
49+
"type": "object",
50+
"required":["type"],
51+
"properties": {
52+
"type":{ "const": "TYPE_USER" }
53+
}
54+
}
55+
}
56+
}
57+
}
58+
}
59+
}
60+
}
61+
"""
62+
And using server "LOCAL"
63+
And user "Alice" has sent the following resource share invitation to federated user:
64+
| resource | textfile.txt |
65+
| space | Personal |
66+
| sharee | Brian |
67+
| shareType | user |
68+
| permissionsRole | Viewer |
69+
And user "Brian" should have "0" emails

0 commit comments

Comments
 (0)