diff --git a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md index b732487ffa..4d957e23d9 100644 --- a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md @@ -272,10 +272,9 @@ The expected failures in this file are from features in the owncloud/ocis repo. ### [MOVE a file into same folder with same name returns 404 instead of 403](https://github.com/owncloud/ocis/issues/1976) -- [apiSpacesShares/moveSpaces.feature:63](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L63) -- [apiSpacesShares/moveSpaces.feature:64](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L64) -- [apiSpacesShares/moveSpaces.feature:332](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L332) -- [apiSpacesShares/moveSpaces.feature:333](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L333) +- [apiSpacesShares/moveSpaces.feature:69](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L69) +- [apiSpacesShares/moveSpaces.feature:70](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L70) +- [apiSpacesShares/moveSpaces.feature:405](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L405) - [apiSpacesDavOperation/moveByFileId.feature:86](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L86) - [apiSpacesDavOperation/moveByFileId.feature:87](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L87) - [apiSpacesDavOperation/moveByFileId.feature:195](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L195) diff --git a/tests/acceptance/features/apiSpacesShares/etagPropagation.feature b/tests/acceptance/features/apiSpacesShares/etagPropagation.feature index b64842f13f..99a3646b78 100644 --- a/tests/acceptance/features/apiSpacesShares/etagPropagation.feature +++ b/tests/acceptance/features/apiSpacesShares/etagPropagation.feature @@ -14,7 +14,12 @@ Feature: check etag propagation after different file alterations Scenario: copying a file inside a folder as a share receiver changes its etag for all collaborators Given user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt" - And user "Alice" has shared folder "/upload" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" inside space "Personal" And user "Alice" has stored etag of element "/upload" inside space "Personal" And user "Alice" has stored etag of element "/upload/file.txt" inside space "Personal" @@ -41,7 +46,12 @@ Feature: check etag propagation after different file alterations Scenario: copying a file inside a folder as a sharer changes its etag for all collaborators Given user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt" - And user "Alice" has shared folder "/upload" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" inside space "Personal" And user "Alice" has stored etag of element "/upload" inside space "Personal" And user "Alice" has stored etag of element "/upload/file.txt" inside space "Personal" @@ -68,7 +78,12 @@ Feature: check etag propagation after different file alterations Scenario: share receiver renaming a file inside a folder changes its etag for all collaborators Given user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt" - And user "Alice" has shared folder "/upload" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" inside space "Personal" And user "Alice" has stored etag of element "/upload" inside space "Personal" And user "Alice" has stored etag of element "/upload/file.txt" on path "/upload/renamed.txt" inside space "Personal" @@ -91,7 +106,12 @@ Feature: check etag propagation after different file alterations Scenario: sharer renaming a file inside a folder changes its etag for all collaborators Given user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt" - And user "Alice" has shared folder "/upload" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" inside space "Personal" And user "Alice" has stored etag of element "/upload" inside space "Personal" And user "Alice" has stored etag of element "/upload/file.txt" on path "/upload/renamed.txt" inside space "Personal" @@ -115,8 +135,18 @@ Feature: check etag propagation after different file alterations Scenario: sharer moving a file from one folder to an other changes the etags of both folders for all collaborators Given user "Alice" has created folder "/dst" And user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt" - And user "Alice" has shared folder "/upload" with user "Brian" - And user "Alice" has shared folder "/dst" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | + And user "Alice" has sent the following share invitation: + | resource | dst | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" inside space "Personal" And user "Alice" has stored etag of element "/upload" inside space "Personal" And user "Alice" has stored etag of element "/dst" inside space "Personal" @@ -139,8 +169,18 @@ Feature: check etag propagation after different file alterations Scenario: sharer moving a folder from one folder to an other changes the etags of both folders for all collaborators Given user "Alice" has created folder "/dst" And user "Alice" has created folder "/upload/toMove" - And user "Alice" has shared folder "/upload" with user "Brian" - And user "Alice" has shared folder "/dst" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | + And user "Alice" has sent the following share invitation: + | resource | dst | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" inside space "Personal" And user "Alice" has stored etag of element "/upload" inside space "Personal" And user "Alice" has stored etag of element "/dst" inside space "Personal" @@ -160,7 +200,12 @@ Feature: check etag propagation after different file alterations Scenario: share receiver creating a folder inside a folder received as a share changes its etag for all collaborators - Given user "Alice" has shared folder "/upload" with user "Brian" + Given user "Alice" has sent the following share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" inside space "Personal" And user "Alice" has stored etag of element "/upload" inside space "Personal" And user "Brian" has stored etag of element "/" inside space "Shares" @@ -176,7 +221,12 @@ Feature: check etag propagation after different file alterations Scenario: sharer creating a folder inside a shared folder changes etag for all collaborators - Given user "Alice" has shared folder "/upload" with user "Brian" + Given user "Alice" has sent the following share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" inside space "Personal" And user "Alice" has stored etag of element "/upload" inside space "Personal" And user "Brian" has stored etag of element "/" inside space "Shares" @@ -192,7 +242,12 @@ Feature: check etag propagation after different file alterations Scenario: share receiver uploading a file inside a folder received as a share changes its etag for all collaborators - Given user "Alice" has shared folder "/upload" with user "Brian" + Given user "Alice" has sent the following share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" inside space "Personal" And user "Alice" has stored etag of element "/upload" inside space "Personal" And user "Brian" has stored etag of element "/" inside space "Shares" @@ -208,7 +263,12 @@ Feature: check etag propagation after different file alterations Scenario: sharer uploading a file inside a shared folder should update etags for all collaborators - Given user "Alice" has shared folder "/upload" with user "Brian" + Given user "Alice" has sent the following share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" inside space "Personal" And user "Alice" has stored etag of element "/upload" inside space "Personal" And user "Brian" has stored etag of element "/" inside space "Shares" @@ -225,7 +285,12 @@ Feature: check etag propagation after different file alterations Scenario: share receiver overwriting a file inside a received shared folder should update etags for all collaborators Given user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt" - And user "Alice" has shared folder "/upload" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" inside space "Personal" And user "Alice" has stored etag of element "/upload" inside space "Personal" And user "Brian" has stored etag of element "/" inside space "Shares" @@ -242,7 +307,12 @@ Feature: check etag propagation after different file alterations Scenario: sharer overwriting a file inside a shared folder should update etags for all collaborators Given user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt" - And user "Alice" has shared folder "/upload" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" inside space "Personal" And user "Alice" has stored etag of element "/upload" inside space "Personal" And user "Brian" has stored etag of element "/" inside space "Shares" @@ -260,7 +330,12 @@ Feature: check etag propagation after different file alterations Scenario: share receiver deleting (removing) a file changes the etags of all parents for all collaborators Given user "Alice" has created folder "/upload/sub" And user "Alice" has uploaded file with content "uploaded content" to "/upload/sub/file.txt" - And user "Alice" has shared folder "/upload" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" inside space "Personal" And user "Alice" has stored etag of element "/upload" inside space "Personal" And user "Alice" has stored etag of element "/upload/sub" inside space "Personal" @@ -286,7 +361,12 @@ Feature: check etag propagation after different file alterations Scenario: sharer deleting (removing) a file changes the etags of all parents for all collaborators Given user "Alice" has created folder "/upload/sub" And user "Alice" has uploaded file with content "uploaded content" to "/upload/sub/file.txt" - And user "Alice" has shared folder "/upload" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" inside space "Personal" And user "Alice" has stored etag of element "/upload" inside space "Personal" And user "Alice" has stored etag of element "/upload/sub" inside space "Personal" @@ -312,7 +392,12 @@ Feature: check etag propagation after different file alterations Scenario: share receiver deleting (removing) a folder changes the etags of all parents for all collaborators Given user "Alice" has created folder "/upload/sub" And user "Alice" has created folder "/upload/sub/toDelete" - And user "Alice" has shared folder "/upload" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" inside space "Personal" And user "Alice" has stored etag of element "/upload" inside space "Personal" And user "Alice" has stored etag of element "/upload/sub" inside space "Personal" @@ -338,7 +423,12 @@ Feature: check etag propagation after different file alterations Scenario: sharer deleting (removing) a folder changes the etags of all parents for all collaborators Given user "Alice" has created folder "/upload/sub" And user "Alice" has created folder "/upload/sub/toDelete" - And user "Alice" has shared folder "/upload" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" inside space "Personal" And user "Alice" has stored etag of element "/upload" inside space "Personal" And user "Alice" has stored etag of element "/upload/sub" inside space "Personal" diff --git a/tests/acceptance/features/apiSpacesShares/favorite.feature b/tests/acceptance/features/apiSpacesShares/favorite.feature index ecdf175536..ed8c0190e9 100644 --- a/tests/acceptance/features/apiSpacesShares/favorite.feature +++ b/tests/acceptance/features/apiSpacesShares/favorite.feature @@ -13,7 +13,12 @@ Feature: favorite Scenario: favorite a received share itself - Given user "Alice" has shared folder "/PARENT" with user "Brian" + Given user "Alice" has sent the following share invitation: + | resource | PARENT | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | When user "Brian" favorites element "/PARENT" in space "Shares" using the WebDAV API Then the HTTP status code should be "207" And as user "Brian" folder "/PARENT" inside space "Shares" should be favorited @@ -21,7 +26,12 @@ Feature: favorite Scenario: favorite a file inside of a received share Given user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt" - And user "Alice" has shared folder "/PARENT" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | PARENT | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | When user "Brian" favorites element "/PARENT/parent.txt" in space "Shares" using the WebDAV API Then the HTTP status code should be "207" And as user "Brian" file "/PARENT/parent.txt" inside space "Shares" should be favorited @@ -29,7 +39,12 @@ Feature: favorite Scenario: favorite a folder inside of a received share Given user "Alice" has created folder "/PARENT/sub-folder" - And user "Alice" has shared folder "/PARENT" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | PARENT | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | When user "Brian" favorites element "/PARENT/sub-folder" in space "Shares" using the WebDAV API Then the HTTP status code should be "207" And as user "Brian" folder "/PARENT/sub-folder" inside space "Shares" should be favorited @@ -37,7 +52,12 @@ Feature: favorite Scenario: sharee file favorite state should not change the favorite state of sharer Given user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt" - And user "Alice" has shared file "/PARENT/parent.txt" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | PARENT/parent.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | File Editor | When user "Brian" favorites element "/parent.txt" in space "Shares" using the WebDAV API Then the HTTP status code should be "207" And as user "Brian" file "/parent.txt" inside space "Shares" should be favorited diff --git a/tests/acceptance/features/apiSpacesShares/moveSpaces.feature b/tests/acceptance/features/apiSpacesShares/moveSpaces.feature index 2a55921c4d..d8265032cb 100644 --- a/tests/acceptance/features/apiSpacesShares/moveSpaces.feature +++ b/tests/acceptance/features/apiSpacesShares/moveSpaces.feature @@ -11,14 +11,16 @@ Feature: move (rename) file And using spaces DAV path - Scenario Outline: moving a file within same space project with role manager and editor + Scenario Outline: moving a file within same space project with role Manager and editor Given the administrator has assigned the role "Space Admin" to user "Brian" using the Graph API And user "Brian" has created a space "Project" with the default quota using the Graph API And user "Brian" has created a folder "newfolder" in space "Project" And user "Brian" has uploaded a file inside space "Project" with content "some content" to "insideSpace.txt" - And user "Brian" has shared a space "Project" with settings: - | shareWith | Alice | - | role | | + And user "Brian" has sent the following share invitation: + | space | Project | + | sharee | Alice | + | shareType | user | + | permissionsRole | | When user "Alice" moves file "insideSpace.txt" to "newfolder/insideSpace.txt" in space "Project" using the WebDAV API Then the HTTP status code should be "201" And for user "Alice" folder "newfolder" of the space "Project" should contain these entries: @@ -26,9 +28,9 @@ Feature: move (rename) file But for user "Alice" the space "Project" should not contain these entries: | insideSpace.txt | Examples: - | space-role | - | manager | - | editor | + | space-role | + | Manager | + | Space Editor | Scenario: moving a file within same space project with role viewer @@ -36,9 +38,11 @@ Feature: move (rename) file And user "Brian" has created a space "Project" with the default quota using the Graph API And user "Brian" has created a folder "newfolder" in space "Project" And user "Brian" has uploaded a file inside space "Project" with content "some content" to "insideSpace.txt" - And user "Brian" has shared a space "Project" with settings: - | shareWith | Alice | - | role | viewer | + And user "Brian" has sent the following share invitation: + | space | Project | + | sharee | Alice | + | shareType | user | + | permissionsRole | Space Viewer | When user "Alice" moves file "insideSpace.txt" to "newfolder/insideSpace.txt" in space "Project" using the WebDAV API Then the HTTP status code should be "403" And for user "Alice" folder "newfolder" of the space "Project" should not contain these entries: @@ -51,18 +55,20 @@ Feature: move (rename) file Given the administrator has assigned the role "Space Admin" to user "Brian" using the Graph API And user "Brian" has created a space "Project" with the default quota using the Graph API And user "Brian" has uploaded a file inside space "Project" with content "some content" to "insideSpace.txt" - And user "Brian" has shared a space "Project" with settings: - | shareWith | Alice | - | role | | + And user "Brian" has sent the following share invitation: + | space | Project | + | sharee | Alice | + | shareType | user | + | permissionsRole | | When user "Alice" moves file "insideSpace.txt" from space "Project" to "insideSpace.txt" inside space "Project" using the WebDAV API Then the HTTP status code should be "403" And as "Brian" file "insideSpace.txt" should not exist in the trashbin of the space "Project" And for user "Alice" the content of the file "insideSpace.txt" of the space "Project" should be "some content" Examples: - | space-role | - | manager | - | editor | - | viewer | + | space-role | + | Manager | + | Space Editor | + | Space Viewer | @issue-8116 Scenario Outline: user moves a file from a space project with different a role to a space project with different role @@ -70,12 +76,16 @@ Feature: move (rename) file And user "Brian" has created a space "Project1" with the default quota using the Graph API And user "Brian" has created a space "Project2" with the default quota using the Graph API And user "Brian" has uploaded a file inside space "Project1" with content "Project1 content" to "project1.txt" - And user "Brian" has shared a space "Project2" with settings: - | shareWith | Alice | - | role | | - And user "Brian" has shared a space "Project1" with settings: - | shareWith | Alice | - | role | | + And user "Brian" has sent the following share invitation: + | space | Project1 | + | sharee | Alice | + | shareType | user | + | permissionsRole | | + And user "Brian" has sent the following share invitation: + | space | Project2 | + | sharee | Alice | + | shareType | user | + | permissionsRole | | When user "Alice" moves file "project1.txt" from space "Project1" to "project1.txt" inside space "Project2" using the WebDAV API Then the HTTP status code should be "" And for user "Alice" the space "Project1" should contain these entries: @@ -84,24 +94,26 @@ Feature: move (rename) file | project1.txt | Examples: | from-space-role | to-space-role | http-status-code | - | manager | manager | 502 | - | editor | manager | 502 | - | manager | editor | 502 | - | editor | editor | 502 | - | manager | viewer | 403 | - | editor | viewer | 403 | - | viewer | manager | 403 | - | viewer | editor | 403 | - | viewer | viewer | 403 | + | Manager | Manager | 502 | + | Space Editor | Manager | 502 | + | Manager | Space Editor | 502 | + | Space Editor | Space Editor | 502 | + | Manager | Space Viewer | 403 | + | Space Editor | Space Viewer | 403 | + | Space Viewer | Manager | 403 | + | Space Viewer | Space Editor | 403 | + | Space Viewer | Space Viewer | 403 | @issue-7618 Scenario Outline: user moves a file from a space project with different role to a space personal Given the administrator has assigned the role "Space Admin" to user "Brian" using the Graph API And user "Brian" has created a space "Project" with the default quota using the Graph API And user "Brian" has uploaded a file inside space "Project" with content "Project content" to "project.txt" - And user "Brian" has shared a space "Project" with settings: - | shareWith | Alice | - | role | | + And user "Brian" has sent the following share invitation: + | space | Project | + | sharee | Alice | + | shareType | user | + | permissionsRole | | When user "Alice" moves file "project.txt" from space "Project" to "project.txt" inside space "Personal" using the WebDAV API Then the HTTP status code should be "" And for user "Alice" the space "Project" should contain these entries: @@ -109,10 +121,10 @@ Feature: move (rename) file And for user "Alice" the space "Personal" should not contain these entries: | project.txt | Examples: - | space-role | http-status-code | - | manager | 502 | - | editor | 502 | - | viewer | 403 | + | space-role | http-status-code | + | Manager | 502 | + | Space Editor | 502 | + | Space Viewer | 403 | Scenario Outline: user moves a file from space project with different role to space Shares with different role (permission) @@ -120,10 +132,17 @@ Feature: move (rename) file And user "Brian" has created a space "Project" with the default quota using the Graph API And user "Brian" has created folder "/testshare" And user "Brian" has uploaded a file inside space "Project" with content "Project content" to "project.txt" - And user "Brian" has shared a space "Project" with settings: - | shareWith | Alice | - | role | | - And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "" + And user "Brian" has sent the following share invitation: + | space | Project | + | sharee | Alice | + | shareType | user | + | permissionsRole | | + And user "Brian" has sent the following share invitation: + | resource | testshare | + | space | Personal | + | sharee | Alice | + | shareType | user | + | permissionsRole | | When user "Alice" moves file "project.txt" from space "Project" to "/testshare/project.txt" inside space "Shares" using the WebDAV API Then the HTTP status code should be "502" And for user "Alice" the space "Project" should contain these entries: @@ -131,24 +150,26 @@ Feature: move (rename) file But for user "Alice" folder "testshare" of the space "Shares" should not contain these entries: | project.txt | Examples: - | space-role | permissions | - | manager | all | - | editor | all | - | viewer | all | - | manager | change | - | editor | change | - | viewer | change | - | manager | read | - | editor | read | - | viewer | read | + | space-role | permissions-role | + | Manager | Editor | + | Space Editor | Editor | + | Space Viewer | Editor | + | Manager | Uploader | + | Space Editor | Uploader | + | Space Viewer | Uploader | + | Manager | Viewer | + | Space Editor | Viewer | + | Space Viewer | Viewer | @issue-7618 Scenario Outline: user moves a file from space personal to space project with different role Given the administrator has assigned the role "Space Admin" to user "Brian" using the Graph API And user "Brian" has created a space "Project" with the default quota using the Graph API - And user "Brian" has shared a space "Project" with settings: - | shareWith | Alice | - | role | | + And user "Brian" has sent the following share invitation: + | space | Project | + | sharee | Alice | + | shareType | user | + | permissionsRole | | And user "Alice" has uploaded file with content "personal space content" to "/personal.txt" When user "Alice" moves file "personal.txt" from space "Personal" to "personal.txt" inside space "Project" using the WebDAV API Then the HTTP status code should be "" @@ -157,15 +178,20 @@ Feature: move (rename) file And for user "Alice" the space "Project" should not contain these entries: | personal.txt | Examples: - | space-role | http-status-code | - | manager | 502 | - | editor | 502 | - | viewer | 403 | + | space-role | http-status-code | + | Manager | 502 | + | Space Editor | 502 | + | Space Viewer | 403 | Scenario Outline: user moves a file from space personal to space Shares with different role (permission) Given user "Brian" has created folder "/testshare" - And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "" + And user "Brian" has sent the following share invitation: + | resource | testshare | + | space | Personal | + | sharee | Alice | + | shareType | user | + | permissionsRole | | And user "Alice" has uploaded file with content "personal content" to "personal.txt" When user "Alice" moves file "personal.txt" from space "Personal" to "/testshare/personal.txt" inside space "Shares" using the WebDAV API Then the HTTP status code should be "502" @@ -174,16 +200,21 @@ Feature: move (rename) file But for user "Alice" folder "testshare" of the space "Shares" should not contain these entries: | project.txt | Examples: - | permissions | - | all | - | change | - | read | + | permissions-role | + | Editor | + | Uploader | + | Viewer | Scenario Outline: user moves a file from space Shares with different role (permissions) to space personal Given user "Brian" has created folder "/testshare" And user "Brian" has uploaded file with content "testshare content" to "/testshare/testshare.txt" - And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "" + And user "Brian" has sent the following share invitation: + | resource | testshare | + | space | Personal | + | sharee | Alice | + | shareType | user | + | permissionsRole | | When user "Alice" moves file "/testshare/testshare.txt" from space "Shares" to "testshare.txt" inside space "Personal" using the WebDAV API Then the HTTP status code should be "502" And for user "Alice" the space "Personal" should not contain these entries: @@ -191,21 +222,28 @@ Feature: move (rename) file And for user "Alice" folder "testshare" of the space "Shares" should contain these entries: | testshare.txt | Examples: - | permissions | - | all | - | change | - | read | + | permissions-role | + | Editor | + | Uploader | + | Viewer | Scenario Outline: user moves a file from space Shares with different role (permissions) to space project with different role Given the administrator has assigned the role "Space Admin" to user "Brian" using the Graph API And user "Brian" has created a space "Project" with the default quota using the Graph API - And user "Brian" has shared a space "Project" with settings: - | shareWith | Alice | - | role | | + And user "Brian" has sent the following share invitation: + | space | Project | + | sharee | Alice | + | shareType | user | + | permissionsRole | | And user "Brian" has created folder "/testshare" And user "Brian" has uploaded file with content "testshare content" to "/testshare/testshare.txt" - And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "" + And user "Brian" has sent the following share invitation: + | resource | testshare | + | space | Personal | + | sharee | Alice | + | shareType | user | + | permissionsRole | | When user "Alice" moves file "/testshare/testshare.txt" from space "Shares" to "testshare.txt" inside space "Project" using the WebDAV API Then the HTTP status code should be "502" And for user "Alice" the space "Project" should not contain these entries: @@ -213,24 +251,34 @@ Feature: move (rename) file And for user "Alice" folder "testshare" of the space "Shares" should contain these entries: | testshare.txt | Examples: - | space-role | permissions | - | manager | all | - | editor | all | - | viewer | all | - | manager | change | - | editor | change | - | viewer | change | - | manager | read | - | editor | read | - | viewer | read | + | space-role | permissions-role | + | Manager | Editor | + | Space Editor | Editor | + | Space Viewer | Editor | + | Manager | Uploader | + | Space Editor | Uploader | + | Space Viewer | Uploader | + | Manager | Viewer | + | Space Editor | Viewer | + | Space Viewer | Viewer | Scenario Outline: user moves a file from space Shares to another space Shares with different role (permissions) Given user "Brian" has created folder "/testshare1" And user "Brian" has created folder "/testshare2" And user "Brian" has uploaded file with content "testshare1 content" to "/testshare1/testshare1.txt" - And user "Brian" has shared folder "/testshare1" with user "Alice" with permissions "" - And user "Brian" has shared folder "/testshare2" with user "Alice" with permissions "" + And user "Brian" has sent the following share invitation: + | resource | testshare1 | + | space | Personal | + | sharee | Alice | + | shareType | user | + | permissionsRole | | + And user "Brian" has sent the following share invitation: + | resource | testshare2 | + | space | Personal | + | sharee | Alice | + | shareType | user | + | permissionsRole | | When user "Alice" moves file "/testshare1/testshare1.txt" from space "Shares" to "/testshare2/testshare1.txt" inside space "Shares" using the WebDAV API Then the HTTP status code should be "502" And for user "Alice" folder "testshare1" of the space "Shares" should contain these entries: @@ -238,22 +286,27 @@ Feature: move (rename) file But for user "Alice" folder "testshare2" of the space "Shares" should not contain these entries: | testshare1.txt | Examples: - | from-permissions | to-permissions | - | all | all | - | all | change | - | all | read | - | change | all | - | change | change | - | change | read | - | read | all | - | read | change | - | read | read | + | from-permissions-role | to-permissions-role | + | Editor | Editor | + | Editor | Uploader | + | Editor | Viewer | + | Uploader | Editor | + | Uploader | Uploader | + | Uploader | Viewer | + | Viewer | Editor | + | Viewer | Uploader | + | Viewer | Viewer | Scenario Outline: moving a file out of a shared folder as a sharer Given user "Brian" has created folder "/testshare" And user "Brian" has uploaded file with content "test data" to "/testshare/testfile.txt" - And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "" + And user "Brian" has sent the following share invitation: + | resource | testshare | + | space | Personal | + | sharee | Alice | + | shareType | user | + | permissionsRole | | When user "Brian" moves file "/testshare/testfile.txt" from space "Personal" to "/testfile.txt" inside space "Personal" using the WebDAV API Then the HTTP status code should be "201" And the content of file "/testfile.txt" for user "Brian" should be "test data" @@ -262,10 +315,10 @@ Feature: move (rename) file And for user "Brian" folder "testshare" of the space "Personal" should not contain these entries: | testfile.txt | Examples: - | permissions | - | all | - | change | - | read | + | permissions-role | + | Editor | + | Uploader | + | Viewer | Scenario Outline: moving a folder out of a shared folder as a sharer @@ -274,7 +327,12 @@ Feature: move (rename) file | /testshare | | /testshare/testsubfolder | And user "Brian" has uploaded file with content "test data" to "/testshare/testsubfolder/testfile.txt" - And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "" + And user "Brian" has sent the following share invitation: + | resource | testshare | + | space | Personal | + | sharee | Alice | + | shareType | user | + | permissionsRole | | When user "Brian" moves folder "/testshare/testsubfolder" from space "Personal" to "/testsubfolder" inside space "Personal" using the WebDAV API Then the HTTP status code should be "201" And the content of file "/testsubfolder/testfile.txt" for user "Brian" should be "test data" @@ -283,33 +341,43 @@ Feature: move (rename) file And for user "Brian" folder "testshare" of the space "Personal" should not contain these entries: | testsubfolder | Examples: - | permissions | - | all | - | change | - | read | + | permissions-role | + | Editor | + | Uploader | + | Viewer | - Scenario Outline: sharee moves a file within a Shares space (all/change permissions) + Scenario Outline: sharee moves a file within a Shares space (Editor/Uploader permissions) Given user "Brian" has created folder "testshare" Given user "Brian" has created folder "testshare/child" And user "Brian" has uploaded file with content "test file content" to "/testshare/testfile.txt" - And user "Brian" has shared folder "testshare" with user "Alice" with permissions "" + And user "Brian" has sent the following share invitation: + | resource | testshare | + | space | Personal | + | sharee | Alice | + | shareType | user | + | permissionsRole | | When user "Alice" moves file "testshare/testfile.txt" from space "Shares" to "testshare/child/testfile.txt" inside space "Shares" using the WebDAV API Then the HTTP status code should be "201" And for user "Alice" the content of the file "testshare/child/testfile.txt" of the space "Shares" should be "test file content" And for user "Alice" folder "testshare" of the space "Shares" should not contain these entries: | testfile.txt | Examples: - | permissions | - | all | - | change | + | permissions-role | + | Editor | + | Uploader | - Scenario: sharee moves a file within a Shares space (read permissions) + Scenario: sharee moves a file within a Shares space (viewer permissions) Given user "Brian" has created folder "testshare" Given user "Brian" has created folder "testshare/child" And user "Brian" has uploaded file with content "test file content" to "/testshare/testfile.txt" - And user "Brian" has shared folder "testshare" with user "Alice" with permissions "read" + And user "Brian" has sent the following share invitation: + | resource | testshare | + | space | Personal | + | sharee | Alice | + | shareType | user | + | permissionsRole | Viewer | When user "Alice" moves file "testshare/testfile.txt" from space "Shares" to "testshare/child/testfile.txt" inside space "Shares" using the WebDAV API Then the HTTP status code should be "403" And for user "Alice" folder "testshare/child" of the space "Shares" should not contain these entries: @@ -321,17 +389,22 @@ Feature: move (rename) file Scenario Outline: sharee tries to move a file into same shared folder with same name Given user "Brian" has created folder "testshare" And user "Brian" has uploaded file with content "test file content" to "testshare/testfile.txt" - And user "Brian" has shared folder "testshare" with user "Alice" with permissions "" + And user "Brian" has sent the following share invitation: + | resource | testshare | + | space | Personal | + | sharee | Alice | + | shareType | user | + | permissionsRole | | When user "Alice" moves file "testshare/testfile.txt" from space "Shares" to "testshare/testfile.txt" inside space "Shares" using the WebDAV API Then the HTTP status code should be "403" And as "Brian" file "testfile.txt" should not exist in the trashbin of the space "Personal" And for user "Alice" the content of the file "testshare/testfile.txt" of the space "Shares" should be "test file content" And for user "Brian" the content of the file "testshare/testfile.txt" of the space "Personal" should be "test file content" Examples: - | permissions | - | all | - | change | - | read | + | permissions-role | + | Editor | + | Uploader | + | Viewer | Scenario: overwrite a file while moving in project space @@ -341,9 +414,11 @@ Feature: move (rename) file And user "Brian" has uploaded a file inside space "Project" with content "root file v1" to "testfile.txt" And user "Brian" has uploaded a file inside space "Project" with content "root file v2" to "testfile.txt" And user "Brian" has uploaded a file inside space "Project" with content "same name file" to "folder/testfile.txt" - And user "Brian" has shared a space "Project" with settings: - | shareWith | Alice | - | role | editor | + And user "Brian" has sent the following share invitation: + | space | Project | + | sharee | Alice | + | shareType | user | + | permissionsRole | Space Editor | When user "Alice" overwrites file "testfile.txt" from space "Project" to "folder/testfile.txt" inside space "Project" while moving using the WebDAV API Then the HTTP status code should be "204" And for user "Alice" the content of the file "folder/testfile.txt" of the space "Project" should be "root file v2"