Skip to content

[tests-only][full-ci] Extend notification tests for User Light role #11275

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

Merged
merged 1 commit into from
May 9, 2025
Merged
Show file tree
Hide file tree
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
78 changes: 51 additions & 27 deletions tests/acceptance/features/apiNotification/notification.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ Feature: Notification
And user "Alice" has uploaded file with content "other data" to "/textfile1.txt"
And user "Alice" has created folder "my_data"

@email
@issue-10937 @email
Scenario Outline: user gets in-app and mail notifications of resource sharing
Given user "Alice" has sent the following resource share invitation:
Given the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | Personal |
| sharee | Brian |
Expand Down Expand Up @@ -85,13 +86,16 @@ Feature: Notification
Click here to view it: %base_url%/files/shares/with-me
"""
Examples:
| resource |
| textfile1.txt |
| my_data |


Scenario Outline: get a notification about a file share in various languages
Given user "Brian" has switched the system language to "<language>" using the <api> API
| user-role | resource |
| User | textfile1.txt |
| User | my_data |
| User Light | textfile1.txt |
| User Light | my_data |

@issue-10937 @email
Scenario Outline: user gets a notification about a file share in various languages
Given the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
And user "Brian" has switched the system language to "<language>" using the <api> API
And user "Alice" has sent the following resource share invitation:
| resource | textfile1.txt |
| space | Personal |
Expand All @@ -118,11 +122,15 @@ Feature: Notification
}
"""
Examples:
| language | subject | message | api |
| de | Neue Freigabe | Alice Hansen hat textfile1.txt mit Ihnen geteilt | Graph |
| de | Neue Freigabe | Alice Hansen hat textfile1.txt mit Ihnen geteilt | settings |
| es | Recurso compartido | Alice Hansen compartió textfile1.txt contigo | Graph |
| es | Recurso compartido | Alice Hansen compartió textfile1.txt contigo | settings |
| user-role | language | subject | message | api |
| User | de | Neue Freigabe | Alice Hansen hat textfile1.txt mit Ihnen geteilt | Graph |
| User | de | Neue Freigabe | Alice Hansen hat textfile1.txt mit Ihnen geteilt | settings |
| User | es | Recurso compartido | Alice Hansen compartió textfile1.txt contigo | Graph |
| User | es | Recurso compartido | Alice Hansen compartió textfile1.txt contigo | settings |
| User Light | de | Neue Freigabe | Alice Hansen hat textfile1.txt mit Ihnen geteilt | Graph |
| User Light | de | Neue Freigabe | Alice Hansen hat textfile1.txt mit Ihnen geteilt | settings |
| User Light | es | Recurso compartido | Alice Hansen compartió textfile1.txt contigo | Graph |
| User Light | es | Recurso compartido | Alice Hansen compartió textfile1.txt contigo | settings |

@env-config
Scenario: get a notification about a file share in default languages
Expand Down Expand Up @@ -171,9 +179,10 @@ Feature: Notification
| textfile1.txt |
| my_data |

@issue-10966 @email
Scenario: check share expired in-app and mail notifications for Personal space file
@issue-10937 @issue-10966 @email
Scenario Outline: check share expired in-app and mail notifications for Personal space file
Given using SharingNG
And the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
And user "Alice" has uploaded file with content "hello world" to "testfile.txt"
And user "Alice" has sent the following resource share invitation:
| resource | testfile.txt |
Expand All @@ -195,10 +204,15 @@ Feature: Notification

Even though this share has been revoked you still might have access through other shares and/or space memberships.
"""
Examples:
| user-role |
| User |
| User Light |

@issue-10966 @email
Scenario: check share expired in-app and mail notifications for Personal space folder
@issue-10937 @issue-10966 @email
Scenario Outline: check share expired in-app and mail notifications for Personal space folder
Given using SharingNG
And the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
And user "Alice" has created folder "folderToShare"
And user "Alice" has sent the following resource share invitation:
| resource | folderToShare |
Expand All @@ -220,10 +234,15 @@ Feature: Notification

Even though this share has been revoked you still might have access through other shares and/or space memberships.
"""
Examples:
| user-role |
| User |
| User Light |

@issue-10904 @email
@issue-10904 @issue-10937 @email
Scenario Outline: user gets an in-app and mail notifications of unsharing resource
Given user "Alice" has sent the following resource share invitation:
Given the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | Personal |
| sharee | Brian |
Expand All @@ -243,17 +262,20 @@ Feature: Notification
Even though this share has been revoked you still might have access through other shares and/or space memberships.
"""
Examples:
| resource |
| textfile1.txt |
| my_data |
| user-role | resource |
| User | textfile1.txt |
| User | my_data |
| User Light | textfile1.txt |
| User Light | my_data |

@issue-10904 @email
@issue-10904 @issue-10937 @email
Scenario Outline: user gets in-app and mail notifications when a resource is unshared (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 "shared-space" with the default quota using the Graph API
And user "Alice" has created a folder "SHARED-FOLDER" in space "shared-space"
And user "Alice" has uploaded a file inside space "shared-space" with content "Sample data" to "file-to-share.txt"
And the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | shared-space |
Expand All @@ -274,9 +296,11 @@ Feature: Notification
Even though this share has been revoked you still might have access through other shares and/or space memberships.
"""
Examples:
| resource |
| file-to-share.txt |
| SHARED-FOLDER |
| user-role | resource |
| User | file-to-share.txt |
| User | SHARED-FOLDER |
| User Light | file-to-share.txt |
| User Light | SHARED-FOLDER |

@issue-9530 @email
Scenario: user gets an in-app and mail notifications when someone with comma in display name shares a file
Expand Down
49 changes: 37 additions & 12 deletions tests/acceptance/features/apiNotification/spaceNotification.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ Feature: Notification
| shareType | user |
| permissionsRole | Space Editor |

@email
Scenario: user gets in-app and mail notifications of space shared
@issue-10937 @email
Scenario Outline: user gets in-app and mail notifications of space shared
And the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
When user "Brian" lists all notifications
Then the HTTP status code should be "200"
And the JSON response should contain a notification message with the subject "Space shared" and the message-details should match
Expand Down Expand Up @@ -83,9 +84,14 @@ Feature: Notification

Click here to view it: %base_url%/f/%space_id%
"""
Examples:
| user-role |
| User |
| User Light |

@email
Scenario: gets in-app and mail notification of space unshared
@issue-10937 @email
Scenario Outline: gets in-app and mail notification of space unshared
Given the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
When user "Alice" removes the access of user "Brian" from space "notification checking" using root endpoint of the Graph API
Then the HTTP status code should be "204"
And user "Brian" should get a notification with subject "Removed from Space" and message:
Expand All @@ -101,10 +107,15 @@ Feature: Notification

Click here to check it: %base_url%/f/%space_id%
"""
Examples:
| user-role |
| User |
| User Light |


Scenario: user gets in-app notification of space disabled (note: no mail notification)
Given user "Alice" has disabled a space "notification checking"
@issue-10937
Scenario Outline: user gets in-app notification of "Space disabled" event (note: no mail notification)
Given the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
And user "Alice" has disabled a space "notification checking"
When user "Brian" lists all notifications
Then the HTTP status code should be "200"
And there should be "2" notifications
Expand Down Expand Up @@ -161,6 +172,10 @@ Feature: Notification
}
}
"""
Examples:
| user-role |
| User |
| User Light |


Scenario Outline: get in-app notification about a space share in various languages
Expand Down Expand Up @@ -191,15 +206,20 @@ Feature: Notification
Then the HTTP status code should be "200"
And the notifications should be empty

@email
Scenario: user doesn't get any notification after being removed from space(note: no mail notification)
Given user "Alice" has removed the access of user "Brian" from space "notification checking"
@issue-10937 @email
Scenario Outline: user doesn't get any notification after being removed from space (note: no mail notification)
Given the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
And user "Alice" has removed the access of user "Brian" from space "notification checking"
And user "Alice" has disabled a space "notification checking"
When user "Brian" lists all notifications
Then the HTTP status code should be "200"
And there should be "2" notifications
And user "Brian" should have "2" emails
But user "Brian" should not have a notification related to space "notification checking" with subject "Space disabled"
Examples:
| user-role |
| User |
| User Light |

@email
Scenario: group members get in-app and email notifications when someone shares a project space with the group
Expand Down Expand Up @@ -275,8 +295,9 @@ Feature: Notification
Zum Ansehen hier klicken: %base_url%/f/%space_id%
"""

@issue-10882 @email
Scenario: user gets in-app and email notifications when space membership expires
@issue-10937 @issue-10882 @email
Scenario Outline: user gets in-app and email notifications when space membership expires
Given the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
When user "Alice" has expired the membership of user "Brian" from space "notification checking"
Then the HTTP status code should be "200"
And user "Brian" should get a notification with subject "Membership expired" and message:
Expand All @@ -290,3 +311,7 @@ Feature: Notification

Even though this membership has expired you still might have access through other shares and/or space memberships
"""
Examples:
| user-role |
| User |
| User Light |
Loading