adding test for updating share link of a project space using permission endpoint (#9251)
This commit is contained in:
@@ -482,7 +482,7 @@ Feature: Create a share link for a resource
|
||||
| space | Personal |
|
||||
| permissionsRole | <permissions-role> |
|
||||
| password | %public% |
|
||||
When user "Alice" updates the last public link share using the Graph API with
|
||||
When user "Alice" updates the last public link share using the permissions endpoint of the Graph API:
|
||||
| resource | textfile1.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | <new-permissions-role> |
|
||||
@@ -552,7 +552,7 @@ Feature: Create a share link for a resource
|
||||
| space | Personal |
|
||||
| permissionsRole | <permissions-role> |
|
||||
| password | %public% |
|
||||
When user "Alice" updates the last public link share using the Graph API with
|
||||
When user "Alice" updates the last public link share using the permissions endpoint of the Graph API:
|
||||
| resource | textfile1.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | internal |
|
||||
@@ -619,7 +619,7 @@ Feature: Create a share link for a resource
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
| expirationDateTime | 2200-07-15T14:00:00.000Z |
|
||||
When user "Alice" updates the last public link share using the Graph API with
|
||||
When user "Alice" updates the last public link share using the permissions endpoint of the Graph API:
|
||||
| resource | textfile1.txt |
|
||||
| space | Personal |
|
||||
| expirationDateTime | 2201-07-15T14:00:00.000Z |
|
||||
@@ -683,7 +683,7 @@ Feature: Create a share link for a resource
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
| expirationDateTime | 2200-07-15T14:00:00.000Z |
|
||||
When user "Alice" updates the last public link share using the Graph API with
|
||||
When user "Alice" updates the last public link share using the permissions endpoint of the Graph API:
|
||||
| resource | <resource> |
|
||||
| space | Personal |
|
||||
| expirationDateTime | |
|
||||
@@ -2801,3 +2801,89 @@ Feature: Create a share link for a resource
|
||||
| upload |
|
||||
| createOnly |
|
||||
| blocksDownload |
|
||||
|
||||
|
||||
Scenario Outline: update link share of a project-space using permissions endpoint
|
||||
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 "projectSpace" with the default quota using the Graph API
|
||||
And user "Alice" has created the following space link share:
|
||||
| space | projectSpace |
|
||||
| permissionsRole | <permissions-role> |
|
||||
| password | %public% |
|
||||
| displayName | Homework |
|
||||
| expirationDateTime | 2200-07-15T14:00:00.000Z |
|
||||
When user "Alice" updates the last public link share using the permissions endpoint of the Graph API:
|
||||
| space | projectSpace |
|
||||
| permissionsRole | <new-permissions-role> |
|
||||
| password | p@$$w0rD |
|
||||
| expirationDateTime | 2201-07-15T14:00:00Z |
|
||||
Then the HTTP status code should be "200"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"hasPassword",
|
||||
"id",
|
||||
"link",
|
||||
"expirationDateTime",
|
||||
"createdDateTime"
|
||||
],
|
||||
"properties": {
|
||||
"hasPassword": {
|
||||
"const": true
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-zA-Z]{15}$"
|
||||
},
|
||||
"expirationDateTime": {
|
||||
"const": "2201-07-15T23:59:59Z"
|
||||
},
|
||||
"link": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"@libre.graph.displayName",
|
||||
"@libre.graph.quickLink",
|
||||
"preventsDownload",
|
||||
"type",
|
||||
"webUrl"
|
||||
],
|
||||
"properties": {
|
||||
"@libre.graph.displayName": {
|
||||
"const": "Homework"
|
||||
},
|
||||
"@libre.graph.quickLink": {
|
||||
"const": false
|
||||
},
|
||||
"preventsDownload": {
|
||||
"const": false
|
||||
},
|
||||
"type": {
|
||||
"const": "<new-permissions-role>"
|
||||
},
|
||||
"webUrl": {
|
||||
"type": "string",
|
||||
"pattern": "^%base_url%/s/[a-zA-Z]{15}$"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
Examples:
|
||||
| permissions-role | new-permissions-role |
|
||||
| view | edit |
|
||||
| view | upload |
|
||||
| view | createOnly |
|
||||
| edit | view |
|
||||
| edit | upload |
|
||||
| edit | createOnly |
|
||||
| upload | view |
|
||||
| upload | edit |
|
||||
| upload | createOnly |
|
||||
| createOnly | view |
|
||||
| createOnly | edit |
|
||||
| createOnly | upload |
|
||||
| blocksDownload | blocksDownload |
|
||||
Reference in New Issue
Block a user