add test for default language (#7464)

This commit is contained in:
Viktor Scharf
2023-10-12 10:40:12 +02:00
committed by GitHub
parent e316d8ea3a
commit 67cfcabe5d
3 changed files with 53 additions and 0 deletions

View File

@@ -168,6 +168,7 @@ default:
- GraphContext:
- FilesVersionsContext:
- SettingsContext:
- OcisConfigContext:
apiAntivirus:
paths:

View File

@@ -180,3 +180,31 @@ Feature: Email notification
Click here to check it: %base_url%/f/%space_id%
"""
@env-config
Scenario: group members get an email notification in default language when someone shares a file with the group
Given the config "SETTINGS_DEFAULT_LANGUAGE" has been set to "de"
And user "Carol" has been created with default attributes and without skeleton files
And group "group1" has been created
And user "Brian" has been added to group "group1"
And user "Carol" has been added to group "group1"
And user "Alice" has uploaded file with content "hello world" to "text.txt"
When user "Alice" shares file "text.txt" with group "group1" using the sharing API
Then the HTTP status code should be "200"
And the OCS status code should be "100"
And user "Brian" should have received the following email from user "Alice"
"""
Hallo Brian Murphy
%displayname% hat "text.txt" mit Ihnen geteilt.
Zum Ansehen hier klicken: %base_url%/files/shares/with-me
"""
And user "Carol" should have received the following email from user "Alice"
"""
Hallo Carol King
%displayname% hat "text.txt" mit Ihnen geteilt.
Zum Ansehen hier klicken: %base_url%/files/shares/with-me
"""

View File

@@ -268,6 +268,30 @@ Feature: Notification
| de | Neue Freigabe | Alice Hansen hat textfile1.txt mit Ihnen geteilt |
| es | Recurso compartido | Alice Hansen compartió textfile1.txt contigo |
@env-config
Scenario: get a notification about a file share in default languages
Given the config "SETTINGS_DEFAULT_LANGUAGE" has been set to "de"
And user "Alice" has shared entry "textfile1.txt" with user "Brian" with permissions "17"
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 "Neue Freigabe" and the message-details should match
"""
{
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string",
"enum": [
"Alice Hansen hat textfile1.txt mit Ihnen geteilt"
]
}
}
}
"""
Scenario Outline: notifications related to a resource get deleted when the resource is deleted
Given user "Alice" has shared entry "<resource>" with user "Brian"