Skip to content

Commit

Permalink
adding test for updating share link of a folder in personal space usi…
Browse files Browse the repository at this point in the history
…ng permission endpoint
  • Loading branch information
nirajacharya2 committed Jun 19, 2024
1 parent ac8f2d9 commit efdcd9b
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
85 changes: 85 additions & 0 deletions tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

0 comments on commit efdcd9b

Please sign in to comment.