adding test for updating share link of a folder in personal space using permission endpoint

This commit is contained in:
Niraj Acharya
2024-05-31 12:36:14 +05:45
parent ac8f2d95b1
commit efdcd9b039
2 changed files with 86 additions and 0 deletions

View File

@@ -274,6 +274,7 @@ The expected failures in this file are from features in the owncloud/ocis repo.
- [apiSharingNgLinkShare/linkShare.feature:3507](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L3507)
- [apiSharingNgLinkShare/linkShare.feature:3634](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L3634)
- [apiSharingNgLinkShare/linkShare.feature:3762](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L3762)
- [apiSharingNgLinkShare/linkShare.feature:4030](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L4030)
- [apiSharingNg/removeAccessToDriveItem.feature:125](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg/removeAccessToDriveItem.feature#L125)
- [apiSharingNg/removeAccessToDriveItem.feature:141](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg/removeAccessToDriveItem.feature#L141)
- [apiSharingNg/removeAccessToDriveItem.feature:161](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg/removeAccessToDriveItem.feature#L161)

View File

@@ -3943,3 +3943,88 @@ Feature: Create a share link for a resource
}
}
"""
Scenario Outline: update link share of a folder inside personal drive using permissions endpoint
Given user "Alice" has created folder "folder"
And user "Alice" has created the following resource link share:
| space | Personal |
| resource | folder |
| permissionsRole | <permissions-role> |
| password | %public% |
| displayName | Homework |
When user "Alice" updates the last public link share using the permissions endpoint of the Graph API:
| space | Personal |
| resource | folder |
| 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 |