diff --git a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md index ec4cb86dace..07556a6dd0b 100644 --- a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md @@ -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) diff --git a/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature b/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature index 25becf22928..7f9962bb385 100644 --- a/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature +++ b/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature @@ -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 | | + | 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 | | + | 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": "" + }, + "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 | \ No newline at end of file