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

[test-only] Api-test. added test for default language #7464

Merged
merged 1 commit into from
Oct 12, 2023
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
1 change: 1 addition & 0 deletions tests/acceptance/config/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ default:
- GraphContext:
- FilesVersionsContext:
- SettingsContext:
- OcisConfigContext:

apiAntivirus:
paths:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
24 changes: 24 additions & 0 deletions tests/acceptance/features/apiNotification/notification.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down