Skip to content

Commit

Permalink
Add test for updating link of a file in project-space
Browse files Browse the repository at this point in the history
  • Loading branch information
prashant-gurung899 committed Jun 3, 2024
1 parent 2a98d8e commit 814b6f7
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2973,3 +2973,75 @@ Feature: Create a share link for a resource
| createOnly | edit |
| createOnly | upload |
# | blocksDownload | blocksDownload |



Scenario Outline: update link share of a file inside a project-space
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 uploaded a file inside space "projectSpace" with content "to share" to "textfile.txt"
And user "Alice" has created the following resource link share:
| resource | textfile.txt |
| space | projectSpace |
| permissionsRole | <permissions-role> |
| displayName | Link |
| password | %public% |
When user "Alice" updates the last public link share using the Graph API with
| resource | textfile.txt |
| space | projectSpace |
| permissionsRole | <new-permissions-role> |
Then the HTTP status code should be "200"
And the JSON data of the response should match
"""
{
"type": "object",
"required": [
"hasPassword",
"id",
"link",
"createdDateTime"
],
"properties": {
"hasPassword": {
"const": true
},
"id": {
"type": "string",
"pattern": "^[a-zA-Z]{15}$"
},
"link": {
"type": "object",
"required": [
"@libre.graph.displayName",
"@libre.graph.quickLink",
"preventsDownload",
"type",
"webUrl"
],
"properties": {
"@libre.graph.displayName": {
"const": "Link"
},
"@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 |
| edit | view |

0 comments on commit 814b6f7

Please sign in to comment.