-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added test for sending share invitation to user with role
- Loading branch information
Showing
4 changed files
with
224 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 87 additions & 0 deletions
87
tests/acceptance/features/apiSharingNg/shareInvitations.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
Feature: Send a sharing invitations | ||
As the owner of a resource | ||
I want to be able to send invitation to a resource | ||
So that other users can have access to it | ||
|
||
https://owncloud.dev/libre-graph-api/#/drives.permissions/Invite | ||
|
||
Background: | ||
Given these users have been created with default attributes and without skeleton files: | ||
| username | | ||
| Alice | | ||
| Brian | | ||
|
||
|
||
Scenario Outline: send sharing invitation for file to user with different permissions via the Graph API | ||
Given user "Alice" has uploaded file with content "to share" to "/textfile1.txt" | ||
When user "Alice" sends sharing invitation for a file "textfile1.txt" of the space "Personal" to user "Brian" with role "<role>" using the Graph API | ||
Then the HTTP status code should be "200" | ||
And the JSON data of the response should match | ||
""" | ||
{ | ||
"type": "object", | ||
"required": [ | ||
"value" | ||
], | ||
"properties": { | ||
"value": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"required": [ | ||
"id", | ||
"roles", | ||
"grantedToV2" | ||
], | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"pattern": "^%share_id_pattern%$" | ||
}, | ||
"roles": { | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"pattern": "^%role_id_pattern%$" | ||
} | ||
}, | ||
"grantedToV2": { | ||
"type": "object", | ||
"required": [ | ||
"user" | ||
], | ||
"properties": { | ||
"user": { | ||
"type": "object", | ||
"required": [ | ||
"id", | ||
"displayName" | ||
], | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"pattern": "^%user_id_pattern%$" | ||
}, | ||
"displayName": { | ||
"type": "string", | ||
"enum": [ | ||
"Brian Murphy" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
""" | ||
Examples: | ||
| role | | ||
| Viewer | | ||
| Editor | | ||
| Co Owner | | ||
| Uploader | | ||
| Manager | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters