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

[full-ci] [tests-only] Added test for sending share invitation to user already received share #8308

Merged
merged 1 commit into from
Jan 30, 2024
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
52 changes: 52 additions & 0 deletions tests/acceptance/features/apiSharingNg/shareInvitations.feature
Original file line number Diff line number Diff line change
Expand Up @@ -1537,3 +1537,55 @@ Feature: Send a sharing invitations
| Manager | file | /textfile1.txt |
| Co Owner | folder | FolderToShare |
| Manager | folder | FolderToShare |


Scenario Outline: send share invitation to already shared user
Given user "Alice" has uploaded file with content "to share" to "textfile1.txt"
And user "Alice" has created folder "FolderToShare"
And user "Alice" has sent the following share invitation:
| resourceType | <resource-type> |
| resource | <path> |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
When user "Alice" tries to send the following share invitation using the Graph API:
| resourceType | <resource-type> |
| resource | <path> |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
Then the HTTP status code should be "409"
And the JSON data of the response should match
"""
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"enum": ["nameAlreadyExists"]
},
"message": {
"type": "string",
"pattern": "^error creating share: error: already exists:.*$"
}
}
}
}
}
"""
Examples:
| resource-type | path |
| file | /textfile1.txt |
| folder | FolderToShare |