diff --git a/tests/acceptance/features/apiOptionalShareRole/editorWithVersions.feature b/tests/acceptance/features/apiOptionalShareRole/editorWithVersions.feature index a83bdc2f862..b28db3669d5 100644 --- a/tests/acceptance/features/apiOptionalShareRole/editorWithVersions.feature +++ b/tests/acceptance/features/apiOptionalShareRole/editorWithVersions.feature @@ -1194,3 +1194,99 @@ Feature: an user shares resources } } """ + + + Scenario Outline: sharee checks versions after updating the permission role of a shared file from other roles to FileEditorWithVersions + Given using spaces DAV path + And the administrator has enabled the permissions role 'File Editor With Versions' + And user "Alice" has uploaded file with content "to share" to "textfile.txt" + And we save it into "FILEID" + And user "Alice" has sent the following resource share invitation: + | resource | textfile.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | | + And user "Alice" has updated the last resource share with the following properties: + | permissionsRole | File Editor With Versions | + | space | Personal | + | resource | textfile.txt | + And user "Brian" has uploaded file with content "updated content" to "Shares/textfile.txt" + When user "Brian" gets the number of versions of file "textfile.txt" using file-id "<>" + Then the HTTP status code should be "207" + And the number of versions should be "1" + Examples: + | permissions-role | + | File Editor | + | Viewer | + + + Scenario Outline: sharee tries to check versions after updating the permission role of a shared file from FileEditorWithVersions to other roles + Given using spaces DAV path + And the administrator has enabled the permissions role 'File Editor With Versions' + And user "Alice" has uploaded file with content "to share" to "textfile.txt" + And user "Alice" has sent the following resource share invitation: + | resource | textfile.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | File Editor With Versions | + And user "Brian" has uploaded file with content "updated content" to "Shares/textfile.txt" + And user "Alice" has updated the last resource share with the following properties: + | permissionsRole | | + | space | Personal | + | resource | textfile.txt | + When user "Brian" tries to get versions of file "textfile.txt" from "Alice" + Then the HTTP status code should be "403" + Examples: + | permissions-role | + | File Editor | + | Viewer | + + + Scenario Outline: sharee checks versions after updating the permission role of the shared folder from other roles to EditorWithVersions + Given the administrator has enabled the permissions role 'Editor With Versions' + And user "Alice" has created folder "folderToShare" + And user "Alice" has uploaded file with content "to share" to "folderToShare/textfile.txt" + And we save it into "FILEID" + And user "Alice" has sent the following resource share invitation: + | resource | folderToShare | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | | + And user "Alice" has updated the last resource share with the following properties: + | permissionsRole | Editor With Versions | + | space | Personal | + | resource | folderToShare | + And user "Brian" has uploaded file with content "updated content" to "Shares/folderToShare/textfile.txt" + When user "Brian" gets the number of versions of file "textfile.txt" using file-id "<>" + Then the HTTP status code should be "207" + And the number of versions should be "1" + Examples: + | permissions-role | + | Editor | + | Viewer | + + + Scenario Outline: sharee tries to check versions after updating the permission role of the shared folder from EditorWithVersions to other roles + Given the administrator has enabled the permissions role 'Editor With Versions' + And user "Alice" has created folder "folderToShare" + And user "Alice" has uploaded file with content "to share" to "folderToShare/textfile.txt" + And user "Alice" has sent the following resource share invitation: + | resource | folderToShare | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor With Versions | + And user "Brian" has uploaded file with content "updated content" to "Shares/folderToShare/textfile.txt" + And user "Alice" has updated the last resource share with the following properties: + | permissionsRole | | + | space | Personal | + | resource | folderToShare | + When user "Brian" tries to get versions of file "folderToShare/textfile.txt" from "Alice" + Then the HTTP status code should be "403" + Examples: + | permissions-role | + | Editor | + | Viewer |