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] refactor scenario to disable mail notification for Share removed event #10925

Merged
merged 1 commit into from
Jan 24, 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
34 changes: 26 additions & 8 deletions tests/acceptance/features/apiSettings/notificationSetting.feature
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,15 @@ Feature: Notification Settings
And the notifications should be empty


Scenario: disable in-app notification for Share Removed event
Scenario: disable mail and in-app notification for Share Removed event
Given user "Alice" has sent the following resource share invitation:
| resource | lorem.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
When user "Brian" disables notification for the following events using the settings API:
| Share Removed | in-app |
| Share Removed | mail, in-app |
Then the HTTP status code should be "201"
And the JSON data of the response should match
"""
Expand Down Expand Up @@ -205,11 +205,19 @@ Feature: Notification Settings
"properties": {
"values":{
"type": "array",
"maxItems": 1,
"minItems": 1,
"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"],
Expand All @@ -231,6 +239,7 @@ Feature: Notification Settings
}
"""
And user "Alice" has removed the access of user "Brian" from resource "lorem.txt" of space "Personal"
And user "Brian" should have "1" emails
When user "Brian" lists all notifications
Then the HTTP status code should be "200"
And user "Brian" should get a notification with subject "Resource shared" and message:
Expand All @@ -239,7 +248,7 @@ Feature: Notification Settings
But user "Brian" should not have a notification related to resource "lorem.txt" with subject "Resource unshared"


Scenario: disable in-app notification for Share Removed event (Project space)
Scenario: disable mail and in-app notification for Share Removed event (Project space)
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
Expand All @@ -251,7 +260,7 @@ Feature: Notification Settings
| shareType | user |
| permissionsRole | Viewer |
When user "Brian" disables notification for the following events using the settings API:
| Share Removed | in-app |
| Share Removed | mail, in-app |
Then the HTTP status code should be "201"
And the JSON data of the response should match
"""
Expand Down Expand Up @@ -293,11 +302,19 @@ Feature: Notification Settings
"properties": {
"values":{
"type": "array",
"maxItems": 1,
"minItems": 1,
"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"],
Expand All @@ -319,6 +336,7 @@ Feature: Notification Settings
}
"""
And user "Alice" has removed the access of user "Brian" from resource "insideSpace.txt" of space "newSpace"
And user "Brian" should have "1" emails
When user "Brian" lists all notifications
Then the HTTP status code should be "200"
And user "Brian" should get a notification with subject "Resource shared" and message:
Expand Down