-
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 4171f79
Showing
5 changed files
with
173 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,9 +88,28 @@ config = { | |
"apiDepthInfinity", | ||
"apiLocks", | ||
"apiActivities", | ||
], | ||
"skip": False, | ||
}, | ||
"settings": { | ||
"suites": [ | ||
"apiSettings", | ||
], | ||
"skip": False, | ||
"withRemotePhp": [True], | ||
"emailNeeded": True, | ||
"extraEnvironment": { | ||
"EMAIL_HOST": "email", | ||
"EMAIL_PORT": "9000", | ||
}, | ||
"extraServerEnvironment": { | ||
"OCIS_ADD_RUN_SERVICES": "notifications", | ||
"NOTIFICATIONS_SMTP_HOST": "email", | ||
"NOTIFICATIONS_SMTP_PORT": "2500", | ||
"NOTIFICATIONS_SMTP_INSECURE": "true", | ||
"NOTIFICATIONS_SMTP_SENDER": "ownCloud <[email protected]>", | ||
"NOTIFICATIONS_DEBUG_ADDR": "0.0.0.0:9174", | ||
}, | ||
}, | ||
"graph": { | ||
"suites": [ | ||
|
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
85 changes: 85 additions & 0 deletions
85
tests/acceptance/features/apiSettings/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,85 @@ | ||
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 have "0" email |