diff --git a/tests/acceptance/features/apiSpacesDavOperation/copyByFileId.feature b/tests/acceptance/features/apiSpacesDavOperation/copyByFileId.feature index 1e5cc80e9..8f5fdcaf2 100644 --- a/tests/acceptance/features/apiSpacesDavOperation/copyByFileId.feature +++ b/tests/acceptance/features/apiSpacesDavOperation/copyByFileId.feature @@ -186,7 +186,12 @@ Feature: copying file using file id And user "Alice" has created folder "folder/sub-folder" And user "Alice" has uploaded file with content "some data" to "/folder/sub-folder/test.txt" And we save it into "FILEID" - And user "Alice" has shared folder "/folder" with user "Brian" with permissions "all" + And user "Alice" has sent the following share invitation: + | resource | folder | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | When user "Brian" copies a file "Shares/folder/sub-folder/test.txt" into "Shares/folder" inside space "Shares" using file-id path "" Then the HTTP status code should be "201" And for user "Brian" folder "folder" of the space "Shares" should contain these files: @@ -206,7 +211,12 @@ Feature: copying file using file id Scenario Outline: copy a file from personal to share space Given user "Brian" has been created with default attributes and without skeleton files And user "Alice" has created folder "/folder" - And user "Alice" has shared folder "/folder" with user "Brian" with permissions "all" + And user "Alice" has sent the following share invitation: + | resource | folder | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Brian" has uploaded file with content "some data" to "/test.txt" And we save it into "FILEID" When user "Brian" copies a file "/test.txt" into "Shares/folder" inside space "Shares" using file-id path "" @@ -228,7 +238,12 @@ Feature: copying file using file id And user "Alice" has created folder "/folder" And user "Alice" has uploaded file with content "some data" to "/folder/test.txt" And we save it into "FILEID" - And user "Alice" has shared folder "/folder" with user "Brian" with permissions "all" + And user "Alice" has sent the following share invitation: + | resource | folder | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | When user "Brian" copies a file "/test.txt" into "/" inside space "Personal" using file-id path "" Then the HTTP status code should be "201" And for user "Brian" folder "folder" of the space "Shares" should contain these files: diff --git a/tests/acceptance/features/apiSpacesDavOperation/fileVersionByFileID.feature b/tests/acceptance/features/apiSpacesDavOperation/fileVersionByFileID.feature index 601305aca..11ff1496b 100644 --- a/tests/acceptance/features/apiSpacesDavOperation/fileVersionByFileID.feature +++ b/tests/acceptance/features/apiSpacesDavOperation/fileVersionByFileID.feature @@ -17,25 +17,28 @@ Feature: checking file versions using file id Scenario Outline: check the file versions of a file shared from project space - Given user "Alice" has created a share inside of space "Project1" with settings: - | path | text.txt | - | shareWith | Brian | - | role | | + Given user "Alice" has sent the following share invitation: + | resource | text.txt | + | space | Project1 | + | sharee | Brian | + | shareType | user | + | permissionsRole | | When user "Alice" gets the number of versions of file "/text.txt" using file-id path "/meta/<>/v" Then the HTTP status code should be "207" And the number of versions should be "1" When user "Brian" tries to get the number of versions of file "/text.txt" using file-id path "/meta/<>/v" Then the HTTP status code should be "403" Examples: - | role | - | editor | - | viewer | - + | role | + | File Editor | + | Viewer | Scenario Outline: check the versions of a file in a shared space as editor/manager - Given user "Alice" has shared a space "Project1" with settings: - | shareWith | Brian | - | role | | + Given user "Alice" has sent the following share invitation: + | space | Project1 | + | sharee | Brian | + | shareType | user | + | permissionsRole | | When user "Alice" gets the number of versions of file "/text.txt" using file-id path "/meta/<>/v" Then the HTTP status code should be "207" And the number of versions should be "1" @@ -43,25 +46,29 @@ Feature: checking file versions using file id Then the HTTP status code should be "207" And the number of versions should be "1" Examples: - | space-role | - | editor | - | manager | + | space-role | + | Space Editor | + | Manager | Scenario: check the versions of a file in a shared space as viewer - Given user "Alice" has shared a space "Project1" with settings: - | shareWith | Brian | - | role | viewer | + Given user "Alice" has sent the following share invitation: + | space | Project1 | + | sharee | Brian | + | shareType | user | + | permissionsRole | Space Viewer | When user "Brian" tries to get the number of versions of file "/text.txt" using file-id path "/meta/<>/v" Then the HTTP status code should be "403" @issue-7738 Scenario Outline: check the versions of a file after moving to a shared folder inside a project space as editor/viewer Given user "Alice" has created a folder "testFolder" in space "Project1" - And user "Alice" has created a share inside of space "Project1" with settings: - | path | testFolder | - | shareWith | Brian | - | role | | + And user "Alice" has sent the following share invitation: + | resource | text.txt | + | space | Project1 | + | sharee | Brian | + | shareType | user | + | permissionsRole | | And user "Alice" has moved file "text.txt" to "/testFolder/movedText.txt" in space "Project1" When user "Alice" gets the number of versions of file "/testFolder/movedText.txt" using file-id path "/meta/<>/v" Then the HTTP status code should be "207" @@ -69,19 +76,24 @@ Feature: checking file versions using file id When user "Brian" tries to get the number of versions of file "/Shares/testFolder/movedText.txt" using file-id path "/meta/<>/v" Then the HTTP status code should be "403" Examples: - | role | - | editor | - | viewer | + | role | + | File Editor | + | Viewer | @issue-7738 Scenario: check the versions of a file after moving it to a shared folder inside a project space as manager Given user "Alice" has created a folder "testFolder" in space "Project1" - And user "Alice" has created a share inside of space "Project1" with settings: - | path | testFolder | - | shareWith | Brian | - And user "Alice" has shared a space "Project1" with settings: - | shareWith | Brian | - | role | manager | + And user "Alice" has sent the following share invitation: + | resource | testFolder | + | space | Project1 | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And user "Alice" has sent the following share invitation: + | space | Project1 | + | sharee | Brian | + | shareType | user | + | permissionsRole | Manager | And user "Alice" has moved file "text.txt" to "/testFolder/movedText.txt" in space "Project1" When user "Brian" gets the number of versions of file "/text.txt" using file-id path "/meta/<>/v" Then the HTTP status code should be "207" diff --git a/tests/acceptance/features/apiSpacesDavOperation/getFileByFileId.feature b/tests/acceptance/features/apiSpacesDavOperation/getFileByFileId.feature index e600b4643..0c07e636d 100644 --- a/tests/acceptance/features/apiSpacesDavOperation/getFileByFileId.feature +++ b/tests/acceptance/features/apiSpacesDavOperation/getFileByFileId.feature @@ -51,7 +51,12 @@ Feature: accessing files using file id Given user "Brian" has been created with default attributes and without skeleton files And user "Alice" has uploaded file with content "some data" to "/textfile.txt" And we save it into "FILEID" - And user "Alice" has shared file "/textfile.txt" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | textfile.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | When user "Brian" sends HTTP method "GET" to URL "" Then the HTTP status code should be "200" And the downloaded content should be "some data" @@ -66,7 +71,12 @@ Feature: accessing files using file id And user "Alice" has created folder "uploadFolder" And user "Alice" has uploaded file with content "some data" to "uploadFolder/textfile.txt" And we save it into "FILEID" - And user "Alice" has shared folder "/uploadFolder" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | uploadFolder | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | When user "Brian" sends HTTP method "GET" to URL "" Then the HTTP status code should be "200" And the downloaded content should be "some data" @@ -82,9 +92,11 @@ Feature: accessing files using file id And user "Alice" has created a space "new-space" with the default quota using the Graph API And user "Alice" has uploaded a file inside space "new-space" with content "some data" to "textfile.txt" And we save it into "FILEID" - And user "Alice" has shared a space "new-space" with settings: - | shareWith | Brian | - | role | viewer | + And user "Alice" has sent the following share invitation: + | space | new-space | + | sharee | Brian | + | shareType | user | + | permissionsRole | Space Viewer | When user "Brian" sends HTTP method "GET" to URL "" Then the HTTP status code should be "200" And the downloaded content should be "some data" diff --git a/tests/acceptance/features/apiSpacesDavOperation/propfindByFileId.feature b/tests/acceptance/features/apiSpacesDavOperation/propfindByFileId.feature index 9ea1ae80b..009492500 100644 --- a/tests/acceptance/features/apiSpacesDavOperation/propfindByFileId.feature +++ b/tests/acceptance/features/apiSpacesDavOperation/propfindByFileId.feature @@ -104,7 +104,12 @@ Feature: propfind a file using file id Given user "Brian" has been created with default attributes and without skeleton files And user "Alice" has uploaded file with content "some data" to "/textfile.txt" And we save it into "FILEID" - And user "Alice" has shared file "/textfile.txt" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | textfile.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | File Editor | When user "Brian" sends HTTP method "PROPFIND" to URL "" Then the HTTP status code should be "207" And the "PROPFIND" response to user "Alice" should contain a mountpoint "Brian Murphy" with these key and value pairs: @@ -120,7 +125,12 @@ Feature: propfind a file using file id Scenario Outline: sharee sends a PROPFIND request to a file inside of a shared folder Given user "Brian" has been created with default attributes and without skeleton files And user "Alice" has created folder "/folder" - And user "Alice" has shared folder "/folder" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | folder | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has uploaded file with content "some data" to "/folder/textfile.txt" And we save it into "FILEID" When user "Brian" sends HTTP method "PROPFIND" to URL "" diff --git a/tests/acceptance/features/apiSpacesDavOperation/updateFileByFileId.feature b/tests/acceptance/features/apiSpacesDavOperation/updateFileByFileId.feature index 4f4765f78..24beb6da2 100644 --- a/tests/acceptance/features/apiSpacesDavOperation/updateFileByFileId.feature +++ b/tests/acceptance/features/apiSpacesDavOperation/updateFileByFileId.feature @@ -51,7 +51,12 @@ Feature: update files using file id Given user "Brian" has been created with default attributes and without skeleton files And user "Alice" has uploaded file with content "some data" to "/textfile.txt" And we save it into "FILEID" - And user "Alice" has shared file "/textfile.txt" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | textfile.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | File Editor | When user "Brian" sends HTTP method "PUT" to URL "" with content "updated content" Then the HTTP status code should be "204" And for user "Alice" the content of the file "/textfile.txt" of the space "Personal" should be "updated content" @@ -67,7 +72,12 @@ Feature: update files using file id And user "Alice" has created folder "uploadFolder" And user "Alice" has uploaded file with content "some data" to "uploadFolder/textfile.txt" And we save it into "FILEID" - And user "Alice" has shared folder "/uploadFolder" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | uploadFolder | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | When user "Brian" sends HTTP method "PUT" to URL "" with content "updated content" Then the HTTP status code should be "204" And for user "Alice" the content of the file "uploadFolder/textfile.txt" of the space "Personal" should be "updated content" @@ -84,17 +94,19 @@ Feature: update files using file id And user "Alice" has created a space "new-space" with the default quota using the Graph API And user "Alice" has uploaded a file inside space "new-space" with content "some data" to "/textfile.txt" And we save it into "FILEID" - And user "Alice" has shared a space "new-space" with settings: - | shareWith | Brian | - | role | | + And user "Alice" has sent the following share invitation: + | space | new-space | + | sharee | Brian | + | shareType | user | + | permissionsRole | | When user "Brian" sends HTTP method "PUT" to URL "" with content "updated content" Then the HTTP status code should be "" And for user "Alice" the content of the file "/textfile.txt" of the space "new-space" should be "" And for user "Brian" the content of the file "/textfile.txt" of the space "new-space" should be "" Examples: - | dav-path | space-role | http-status-code | file-content | - | /remote.php/dav/spaces/<> | viewer | 403 | some data | - | /dav/spaces/<> | editor | 204 | updated content | + | dav-path | space-role | http-status-code | file-content | + | /remote.php/dav/spaces/<> | Space Viewer | 403 | some data | + | /dav/spaces/<> | Space Editor | 204 | updated content | Scenario Outline: user tries to update content of a file owned by others