add test to disable mail and in-app notifications for space membership expired event
Signed-off-by: prashant-gurung899 <prasantgrg777@gmail.com>
This commit is contained in:
1 file changed
+102
@@ -739,3 +739,105 @@ Feature: Notification Settings
|
||||
|
||||
Click here to view it: %base_url%/f/%space_id%
|
||||
"""
|
||||
|
||||
@email
|
||||
Scenario: disable mail and in-app notification for "Space Membership Expired" event
|
||||
Given using spaces DAV path
|
||||
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "newSpace" with the default quota using the Graph API
|
||||
And user "Alice" has sent the following space share invitation:
|
||||
| space | newSpace |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | Space Viewer |
|
||||
When user "Brian" disables notification for the following events using the settings API:
|
||||
| Space Membership Expired | mail,in-app |
|
||||
Then the HTTP status code should be "201"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
{
|
||||
"type": "object",
|
||||
"required": ["value"],
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "object",
|
||||
"required": ["identifier","value"],
|
||||
"properties": {
|
||||
"identifier":{
|
||||
"type": "object",
|
||||
"required": ["extension","bundle","setting"],
|
||||
"properties": {
|
||||
"extension":{ "const": "ocis-accounts" },
|
||||
"bundle":{ "const": "profile" },
|
||||
"setting":{ "const": "event-space-membership-expired-options" }
|
||||
}
|
||||
},
|
||||
"value":{
|
||||
"type": "object",
|
||||
"required": ["id","bundleId","settingId","accountUuid","resource","collectionValue"],
|
||||
"properties":{
|
||||
"id":{ "pattern":"%uuidv4_pattern%" },
|
||||
"bundleId":{ "pattern":"%uuidv4_pattern%" },
|
||||
"settingId":{ "pattern":"%uuidv4_pattern%" },
|
||||
"accountUuid":{ "pattern":"%uuidv4_pattern%" },
|
||||
"resource":{
|
||||
"type": "object",
|
||||
"required":["type"],
|
||||
"properties": {
|
||||
"type":{ "const": "TYPE_USER" }
|
||||
}
|
||||
},
|
||||
"collectionValue":{
|
||||
"type": "object",
|
||||
"required":["values"],
|
||||
"properties": {
|
||||
"values":{
|
||||
"type": "array",
|
||||
"maxItems": 2,
|
||||
"minItems": 2,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"required": ["key","boolValue"],
|
||||
"properties": {
|
||||
"key":{ "const": "mail" },
|
||||
"boolValue":{ "const": false }
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": ["key","boolValue"],
|
||||
"properties": {
|
||||
"key":{ "const": "in-app" },
|
||||
"boolValue":{ "const": false }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
When user "Alice" expires the user share of space "newSpace" for user "Brian"
|
||||
Then the HTTP status code should be "200"
|
||||
And user "Brian" should get a notification with subject "Space shared" and message:
|
||||
| message |
|
||||
| Alice Hansen added you to Space newSpace |
|
||||
But user "Brian" should not have a notification related to space "newSpace" with subject "Membership expired"
|
||||
And user "Brian" should have "1" emails
|
||||
And user "Brian" should have received the following email from user "Alice" about the share of project space "newSpace"
|
||||
"""
|
||||
Hello Brian Murphy,
|
||||
|
||||
%displayname% has invited you to join "newSpace".
|
||||
|
||||
Click here to view it: %base_url%/f/%space_id%
|
||||
"""
|
||||
Reference in new issue
Block a user