Merge pull request #10896 from owncloud/test-notification-space-deleted

[tests-only][full-ci] adding test for disabling in-app notifications for space deleted event
This commit is contained in:
Sawjan Gurung authored and GitHub committed 2025-05-15 12:41:07 +05:45
commit 9857444274
1 file changed
+79
@@ -1049,3 +1049,82 @@ Feature: Notification Settings
| lorem.txt | User Light |
| uploadFolder | User |
| uploadFolder | User Light |
@issue-10941
Scenario: disable in-app notification for "Space Deleted" event
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has sent the following space share invitation:
| space | new-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | Space Viewer |
When user "Brian" disables notification for the following event using the settings API:
| event | Space Deleted |
| notificationTypes | 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-deleted-options" }
}
},
"value": {
"type": "object",
"required": ["id", "bundleId", "settingId", "accountUuid", "resource", "collectionValue"],
"properties": {
"id": { "pattern": "%user_id_pattern%" },
"bundleId": { "pattern": "%user_id_pattern%" },
"settingId": { "pattern": "%user_id_pattern%" },
"accountUuid": { "pattern": "%user_id_pattern%" },
"resource": {
"type": "object",
"required": ["type"],
"properties": {
"type": { "const": "TYPE_USER" }
}
},
"collectionValue": {
"type": "object",
"required": ["values"],
"properties": {
"values": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"required": ["key", "boolValue"],
"properties": {
"key": { "const": "in-app" },
"boolValue": { "const": false }
}
}
}
}
}
}
}
}
}
}
}
"""
And user "Alice" has disabled a space "new-space"
And user "Alice" has deleted a space "new-space"
When user "Brian" lists all notifications
Then the HTTP status code should be "200"
And user "Brian" should not have any notification