Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests-only][full-ci] add test to disable notifications for Added as space member event #10902

Merged
merged 1 commit into from
Feb 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions tests/acceptance/features/apiSettings/notificationSetting.feature
Original file line number Diff line number Diff line change
Expand Up @@ -667,3 +667,94 @@ Feature: Notification Settings
| message |
| Alice Hansen shared lorem.txt with you |
And user "Brian" should have "0" emails


Scenario: disable mail and in-app notification for "Added as space member" 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
When user "Brian" disables notification for the following events using the settings API:
| Added as space member | 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-shared-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 }
}
}
]
}
}
}
}
}
}
}
}
}
}
"""
And user "Alice" has sent the following space share invitation:
| space | newSpace |
| sharee | Brian |
| shareType | user |
| permissionsRole | Space Viewer |
When user "Brian" lists all notifications
Then the HTTP status code should be "200"
And the notifications should be empty
And user "Brian" should have "0" emails