-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding test for disabling mail and in-app notifications
- Loading branch information
1 parent
b48b113
commit d32a39e
Showing
4 changed files
with
196 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
92 changes: 92 additions & 0 deletions
92
tests/acceptance/features/apiNotification/notificationSetting.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
Feature: Notification Settings | ||
As a user | ||
I want to manage my notification settings | ||
So that I do not get notified of unimportant events | ||
|
||
|
||
Scenario: disable email notification | ||
Given these users have been created with default attributes: | ||
| username | | ||
| Alice | | ||
| Brian | | ||
And user "Alice" has uploaded file with content "some data" to "lorem.txt" | ||
When user "Brian" disables email notification using the settings API | ||
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": "disable-email-notifications" | ||
} | ||
} | ||
}, | ||
"value":{ | ||
"type": "object", | ||
"required": [ | ||
"bundleId", | ||
"settingId", | ||
"accountUuid", | ||
"resource", | ||
"boolValue" | ||
], | ||
"properties":{ | ||
"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" | ||
} | ||
} | ||
}, | ||
"boolValue":{ | ||
"const": true | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
""" | ||
And user "Alice" has sent the following resource share invitation: | ||
| resource | lorem.txt | | ||
| space | Personal | | ||
| sharee | Brian | | ||
| shareType | user | | ||
| permissionsRole | Viewer | | ||
And user "Brian" should not have received the following email from user "Alice" | ||
""" | ||
Hello Brian Murphy | ||
%displayname% has shared "lorem.txt" with you. | ||
Click here to view it: %base_url%/files/shares/with-me | ||
""" |