diff --git a/tests/acceptance/config/behat-core.yml b/tests/acceptance/config/behat-core.yml index e0d584e897..aeb4c16ce2 100644 --- a/tests/acceptance/config/behat-core.yml +++ b/tests/acceptance/config/behat-core.yml @@ -94,6 +94,7 @@ default: - WebDavPropertiesContext: - FilesVersionsContext: - SettingsContext: + - SharingNgContext: coreApiShareManagementBasicToShares: paths: diff --git a/tests/acceptance/expected-failures-API-on-OCIS-storage.md b/tests/acceptance/expected-failures-API-on-OCIS-storage.md index 25c3ab08df..e6fd7f73cb 100644 --- a/tests/acceptance/expected-failures-API-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-API-on-OCIS-storage.md @@ -60,10 +60,10 @@ File and sync features in a shared scenario #### [accepting matching name shared resources from different users/groups sets no serial identifiers on the resource name for the receiver](https://github.com/owncloud/ocis/issues/4289) -- [coreApiShareManagementToShares/acceptShares.feature:249](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L249) -- [coreApiShareManagementToShares/acceptShares.feature:269](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L269) -- [coreApiShareManagementToShares/acceptShares.feature:480](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L480) -- [coreApiShareManagementToShares/acceptShares.feature:546](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L546) +- [coreApiShareManagementToShares/acceptShares.feature:309](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L309) +- [coreApiShareManagementToShares/acceptShares.feature:334](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L334) +- [coreApiShareManagementToShares/acceptShares.feature:565](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L565) +- [coreApiShareManagementToShares/acceptShares.feature:631](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L631) - [coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:39](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L39) - [coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:40](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L40) - [coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:126](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L126) @@ -364,11 +364,11 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers - [coreApiShareManagementToShares/acceptShares.feature:28](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L28) - [coreApiShareManagementToShares/acceptShares.feature:64](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L64) -- [coreApiShareManagementToShares/acceptShares.feature:139](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L139) -- [coreApiShareManagementToShares/acceptShares.feature:161](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L161) -- [coreApiShareManagementToShares/acceptShares.feature:190](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L190) -- [coreApiShareManagementToShares/acceptShares.feature:238](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L238) -- [coreApiShareManagementToShares/acceptShares.feature:457](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L457) +- [coreApiShareManagementToShares/acceptShares.feature:154](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L154) +- [coreApiShareManagementToShares/acceptShares.feature:186](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L186) +- [coreApiShareManagementToShares/acceptShares.feature:230](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L230) +- [coreApiShareManagementToShares/acceptShares.feature:298](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L298) +- [coreApiShareManagementToShares/acceptShares.feature:532](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L532) - [coreApiShareOperationsToShares2/shareAccessByID.feature:125](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature#L125) - [coreApiShareOperationsToShares2/shareAccessByID.feature:126](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature#L126) - [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:213](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L213) diff --git a/tests/acceptance/features/bootstrap/SpacesContext.php b/tests/acceptance/features/bootstrap/SpacesContext.php index 0ab0da5ee5..6a00e1118f 100644 --- a/tests/acceptance/features/bootstrap/SpacesContext.php +++ b/tests/acceptance/features/bootstrap/SpacesContext.php @@ -346,7 +346,7 @@ class SpacesContext implements Context { if ($folderName === $space["name"]) { $folderName = ''; } - $fullUrl = $space["root"]["webDavUrl"] . "/" . $folderName; + $fullUrl = $space["root"]["webDavUrl"] . "/" . \rawurlencode($folderName); $response = HttpRequestHelper::sendRequest( $fullUrl, $this->featureContext->getStepLineRef(), diff --git a/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature b/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature index 1bf0c79f87..37b01ca639 100644 --- a/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature +++ b/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature @@ -83,8 +83,18 @@ Feature: accept/decline shares coming from internal users @smokeTest @issue-2131 Scenario: accept a pending share Given user "Brian" has disabled auto-accepting - And user "Alice" has shared folder "/PARENT" with user "Brian" - And user "Alice" has shared file "/textfile0.txt" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | PARENT | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | + And user "Alice" has sent the following resource share invitation: + | resource | textfile0.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | File Editor | When user "Brian" accepts share "/PARENT" offered by user "Alice" using the sharing API And user "Brian" accepts share "/textfile0.txt" offered by user "Alice" using the sharing API Then the OCS status code of responses on all endpoints should be "100" @@ -125,7 +135,12 @@ Feature: accept/decline shares coming from internal users Scenario: accept an accepted share Given user "Brian" has disabled auto-accepting And user "Alice" has created folder "/shared" - And user "Alice" has shared folder "/shared" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | shared | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | When user "Brian" accepts share "/shared" offered by user "Alice" using the sharing API Then the OCS status code should be "100" And the HTTP status code should be "200" @@ -138,8 +153,18 @@ Feature: accept/decline shares coming from internal users @smokeTest @issue-2540 Scenario: declines a pending share Given user "Brian" has disabled auto-accepting - And user "Alice" has shared folder "/PARENT" with user "Brian" - And user "Alice" has shared file "/textfile0.txt" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | PARENT | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And user "Alice" has sent the following resource share invitation: + | resource | textfile0.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | When user "Brian" declines share "/PARENT" offered by user "Alice" using the sharing API And user "Brian" declines share "/textfile0.txt" offered by user "Alice" using the sharing API Then the OCS status code of responses on all endpoints should be "100" @@ -160,8 +185,18 @@ Feature: accept/decline shares coming from internal users @smokeTest @issue-2128 @issue-2540 Scenario: decline an accepted share Given user "Brian" has disabled auto-accepting - And user "Alice" has shared folder "/PARENT" with user "Brian" - And user "Alice" has shared file "/textfile0.txt" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | PARENT | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And user "Alice" has sent the following resource share invitation: + | resource | textfile0.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | And user "Brian" has accepted share "/PARENT" offered by user "Alice" And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice" When user "Brian" declines share "/Shares/PARENT" offered by user "Alice" using the sharing API @@ -180,7 +215,12 @@ Feature: accept/decline shares coming from internal users Scenario: deleting shares in pending state Given user "Alice" has shared folder "/PARENT" with user "Brian" - And user "Alice" has shared file "/textfile0.txt" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | textfile0.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | When user "Alice" deletes folder "/PARENT" using the WebDAV API And user "Alice" deletes file "/textfile0.txt" using the WebDAV API Then the HTTP status code of responses on all endpoints should be "204" @@ -190,8 +230,18 @@ Feature: accept/decline shares coming from internal users Scenario: only one user in a group accepts a share Given user "Brian" has disabled auto-accepting And user "Carol" has disabled auto-accepting - And user "Alice" has shared folder "/PARENT" with group "grp1" - And user "Alice" has shared file "/textfile0.txt" with group "grp1" + And user "Alice" has sent the following resource share invitation: + | resource | PARENT | + | space | Personal | + | sharee | grp1 | + | shareType | group | + | permissionsRole | Viewer | + And user "Alice" has sent the following resource share invitation: + | resource | textfile0.txt | + | space | Personal | + | sharee | grp1 | + | shareType | group | + | permissionsRole | Viewer | When user "Brian" accepts share "/PARENT" offered by user "Alice" using the sharing API And user "Brian" accepts share "/textfile0.txt" offered by user "Alice" using the sharing API Then the OCS status code of responses on all endpoints should be "100" @@ -220,8 +270,18 @@ Feature: accept/decline shares coming from internal users And user "Alice" has created folder "/shared/Alice" And user "Brian" has created folder "/shared" And user "Brian" has created folder "/shared/Brian" - And user "Alice" has shared folder "/shared" with user "Carol" - And user "Brian" has shared folder "/shared" with user "Carol" + And user "Alice" has sent the following resource share invitation: + | resource | shared | + | space | Personal | + | sharee | Carol | + | shareType | user | + | permissionsRole | Viewer | + And user "Brian" has sent the following resource share invitation: + | resource | shared | + | space | Personal | + | sharee | Carol | + | shareType | user | + | permissionsRole | Viewer | When user "Carol" accepts share "/shared" offered by user "Brian" using the sharing API And user "Carol" accepts share "/shared" offered by user "Alice" using the sharing API Then the OCS status code of responses on all endpoints should be "100" @@ -252,7 +312,12 @@ Feature: accept/decline shares coming from internal users And user "Brian" has uploaded file with content "Second file" to "/testfile.txt" And user "Carol" has created folder "Shares" And user "Carol" has uploaded file with content "Third file" to "/Shares/testfile.txt" - And user "Alice" has shared file "/testfile.txt" with user "Carol" + And user "Alice" has sent the following resource share invitation: + | resource | testfile.txt | + | space | Personal | + | sharee | Carol | + | shareType | user | + | permissionsRole | Viewer | When user "Carol" declines share "/Shares/testfile (2).txt" offered by user "Alice" using the sharing API And user "Brian" shares file "/testfile.txt" with user "Carol" using the sharing API Then the HTTP status code should be "200" @@ -270,9 +335,19 @@ Feature: accept/decline shares coming from internal users Given user "Alice" has disabled auto-accepting And user "David" has been created with default attributes and without skeleton files And user "David" has created folder "PARENT" - And user "Brian" has shared folder "/PARENT" with user "Alice" + And user "Brian" has sent the following resource share invitation: + | resource | PARENT | + | space | Personal | + | sharee | Alice | + | shareType | user | + | permissionsRole | Viewer | And user "Carol" has created folder "PARENT" - And user "Carol" has shared folder "/PARENT" with user "Alice" + And user "Carol" has sent the following resource share invitation: + | resource | PARENT | + | space | Personal | + | sharee | Alice | + | shareType | user | + | permissionsRole | Viewer | And user "Alice" has created folder "Shares" And user "Alice" has created folder "Shares/PARENT" When user "Alice" accepts share "/PARENT" offered by user "Brian" using the sharing API @@ -456,7 +531,12 @@ Feature: accept/decline shares coming from internal users @issue-1123 @issue-2540 Scenario: deleting a share accepted file and folder Given user "Brian" has disabled auto-accepting - And user "Alice" has shared folder "/PARENT" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | PARENT | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Brian" has accepted share "/PARENT" offered by user "Alice" When user "Brian" deletes file "/Shares/PARENT" using the WebDAV API Then the HTTP status code should be "204" @@ -469,7 +549,12 @@ Feature: accept/decline shares coming from internal users Given user "Brian" has disabled auto-accepting And user "Alice" has uploaded file with content "Test Content." to "/toShareFile.txt" And user "Alice" has uploaded file with content "Content Test Updated." to "/toShareFile.txt" - And user "Alice" has shared file "/toShareFile.txt" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | toShareFile.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | File Editor | And user "Brian" has accepted share "/toShareFile.txt" offered by user "Alice" When user "Alice" restores version index "1" of file "/toShareFile.txt" using the WebDAV API Then the HTTP status code should be "204" diff --git a/tests/acceptance/features/coreApiShareManagementToShares/acceptSharesToSharesFolder.feature b/tests/acceptance/features/coreApiShareManagementToShares/acceptSharesToSharesFolder.feature index d889122196..14261a8db7 100644 --- a/tests/acceptance/features/coreApiShareManagementToShares/acceptSharesToSharesFolder.feature +++ b/tests/acceptance/features/coreApiShareManagementToShares/acceptSharesToSharesFolder.feature @@ -16,7 +16,12 @@ Feature: accept/decline shares coming from internal users to the Shares folder Scenario: accept an incoming file share Given user "Alice" has uploaded file with content "ownCloud test text file 0" to "textfile0.txt" And user "Brian" has disabled auto-accepting - And user "Alice" has shared file "/textfile0.txt" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | textfile0.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | When user "Brian" accepts share "/textfile0.txt" offered by user "Alice" using the sharing API Then the OCS status code should be "100" And the HTTP status code should be "200" @@ -27,7 +32,12 @@ Feature: accept/decline shares coming from internal users to the Shares folder Given user "Alice" has created folder "/PARENT" And user "Brian" has disabled auto-accepting And user "Alice" has uploaded file with content "ownCloud test text file parent" to "PARENT/parent.txt" - And user "Alice" has shared file "/PARENT" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | PARENT | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | When user "Brian" accepts share "/PARENT" offered by user "Alice" using the sharing API Then the content of file "/Shares/PARENT/parent.txt" for user "Brian" should be "ownCloud test text file parent" @@ -35,7 +45,12 @@ Feature: accept/decline shares coming from internal users to the Shares folder Scenario: accept an incoming file share and check the response Given user "Alice" has uploaded file with content "ownCloud test text file 0" to "textfile0.txt" And user "Brian" has disabled auto-accepting - And user "Alice" has shared file "/textfile0.txt" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | textfile0.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | File Editor | When user "Brian" accepts share "/textfile0.txt" offered by user "Alice" using the sharing API Then the OCS status code should be "100" And the HTTP status code should be "200" @@ -58,7 +73,12 @@ Feature: accept/decline shares coming from internal users to the Shares folder Given user "Alice" has created folder "/PARENT" And user "Brian" has disabled auto-accepting And user "Alice" has uploaded file with content "ownCloud test text file parent" to "PARENT/parent.txt" - And user "Alice" has shared file "/PARENT" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | PARENT | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | When user "Brian" accepts share "/PARENT" offered by user "Alice" using the sharing API Then the OCS status code should be "100" And the HTTP status code should be "200" diff --git a/tests/acceptance/features/coreApiShareManagementToShares/moveReceivedShare.feature b/tests/acceptance/features/coreApiShareManagementToShares/moveReceivedShare.feature index 8d0a782621..9a70272fe4 100644 --- a/tests/acceptance/features/coreApiShareManagementToShares/moveReceivedShare.feature +++ b/tests/acceptance/features/coreApiShareManagementToShares/moveReceivedShare.feature @@ -13,8 +13,18 @@ Feature: sharing Scenario Outline: sharer renames the shared item (old/new webdav) Given user "Alice" has uploaded file with content "foo" to "sharefile.txt" And using DAV path - And user "Alice" has shared file "sharefile.txt" with user "Brian" - And user "Alice" has shared file "sharefile.txt" with user "Carol" + And user "Alice" has sent the following resource share invitation: + | resource | sharefile.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And user "Alice" has sent the following resource share invitation: + | resource | sharefile.txt | + | space | Personal | + | sharee | Carol | + | shareType | user | + | permissionsRole | Viewer | When user "Alice" moves file "sharefile.txt" to "renamedsharefile.txt" using the WebDAV API Then the HTTP status code should be "201" And as "Alice" file "renamedsharefile.txt" should exist @@ -41,8 +51,18 @@ Feature: sharing @issue-8242 Scenario Outline: sharer renames the shared item (spaces webdav) Given user "Alice" has uploaded file with content "foo" to "sharefile.txt" - And user "Alice" has shared file "sharefile.txt" with user "Brian" - And user "Alice" has shared file "sharefile.txt" with user "Carol" + And user "Alice" has sent the following resource share invitation: + | resource | sharefile.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And user "Alice" has sent the following resource share invitation: + | resource | sharefile.txt | + | space | Personal | + | sharee | Carol | + | shareType | user | + | permissionsRole | Viewer | When user "Alice" moves file "sharefile.txt" to "renamedsharefile.txt" using the WebDAV API Then the HTTP status code should be "201" And as "Alice" file "renamedsharefile.txt" should exist @@ -70,8 +90,18 @@ Feature: sharing Scenario Outline: share receiver renames the shared item (old/new webdav) Given user "Alice" has uploaded file with content "foo" to "/sharefile.txt" And using DAV path - And user "Alice" has shared file "sharefile.txt" with user "Brian" - And user "Alice" has shared file "sharefile.txt" with user "Carol" + And user "Alice" has sent the following resource share invitation: + | resource | sharefile.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And user "Alice" has sent the following resource share invitation: + | resource | sharefile.txt | + | space | Personal | + | sharee | Carol | + | shareType | user | + | permissionsRole | Viewer | When user "Carol" moves file "Shares/sharefile.txt" to "Shares/renamedsharefile.txt" using the WebDAV API Then the HTTP status code should be "201" And as "Carol" file "Shares/renamedsharefile.txt" should exist @@ -98,8 +128,18 @@ Feature: sharing @issue-8242 Scenario Outline: share receiver renames the shared item (spaces webdav) Given user "Alice" has uploaded file with content "foo" to "/sharefile.txt" - And user "Alice" has shared file "sharefile.txt" with user "Brian" - And user "Alice" has shared file "sharefile.txt" with user "Carol" + And user "Alice" has sent the following resource share invitation: + | resource | sharefile.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And user "Alice" has sent the following resource share invitation: + | resource | sharefile.txt | + | space | Personal | + | sharee | Carol | + | shareType | user | + | permissionsRole | Viewer | When user "Carol" moves file "Shares/sharefile.txt" to "Shares/renamedsharefile.txt" using the WebDAV API Then the HTTP status code should be "201" And as "Carol" file "Shares/renamedsharefile.txt" should exist @@ -129,7 +169,12 @@ Feature: sharing And user "Brian" has been added to group "grp1" And user "Carol" has been added to group "grp1" And user "Alice" has created folder "/TMP" - And user "Alice" has shared folder "TMP" with group "grp1" + And user "Alice" has sent the following resource share invitation: + | resource | TMP | + | space | Personal | + | sharee | grp1 | + | shareType | group | + | permissionsRole | Viewer | When user "Carol" moves folder "/Shares/TMP" to "/Shares/new" using the WebDAV API And the administrator deletes user "Carol" using the provisioning API Then the HTTP status code of responses on each endpoint should be "201, 204" respectively @@ -139,7 +184,12 @@ Feature: sharing Scenario: receiver renames a received share with read, change permissions inside the Shares folder Given user "Alice" has created folder "folderToShare" And user "Alice" has uploaded file with content "thisIsAFileInsideTheSharedFolder" to "/folderToShare/fileInside" - And user "Alice" has shared folder "folderToShare" with user "Brian" with permissions "read,change" + And user "Alice" has sent the following resource share invitation: + | resource | folderToShare | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | When user "Brian" moves folder "/Shares/folderToShare" to "/Shares/myFolder" using the WebDAV API Then the HTTP status code should be "201" And as "Brian" folder "/Shares/myFolder" should exist @@ -154,7 +204,12 @@ Feature: sharing Scenario: receiver tries to rename a received share with read permissions inside the Shares folder Given user "Alice" has created folder "folderToShare" And user "Alice" has uploaded file with content "thisIsAFileInsideTheSharedFolder" to "/folderToShare/fileInside" - And user "Alice" has shared folder "folderToShare" with user "Brian" with permissions "read" + And user "Alice" has sent the following resource share invitation: + | resource | folderToShare | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | When user "Brian" moves folder "/Shares/folderToShare" to "/Shares/myFolder" using the WebDAV API Then the HTTP status code should be "201" And as "Brian" folder "/Shares/myFolder" should exist @@ -167,7 +222,12 @@ Feature: sharing Scenario: receiver renames a received folder share to a different name on the same folder Given user "Alice" has created folder "PARENT" - And user "Alice" has shared folder "PARENT" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | PARENT | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | When user "Brian" moves folder "/Shares/PARENT" to "/Shares/myFolder" using the WebDAV API Then the HTTP status code should be "201" And as "Brian" folder "/Shares/myFolder" should exist @@ -176,7 +236,12 @@ Feature: sharing Scenario: receiver renames a received file share to different name on the same folder Given user "Alice" has uploaded file "filesForUpload/textfile.txt" to "fileToShare.txt" - And user "Alice" has shared file "fileToShare.txt" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | fileToShare.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | File Editor | When user "Brian" moves file "/Shares/fileToShare.txt" to "/Shares/newFile.txt" using the WebDAV API Then the HTTP status code should be "201" And as "Brian" file "/Shares/newFile.txt" should exist @@ -187,7 +252,12 @@ Feature: sharing Given group "grp1" has been created And user "Brian" has been added to group "grp1" And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "fileToShare.txt" - And user "Alice" has shared file "fileToShare.txt" with group "grp1" + And user "Alice" has sent the following resource share invitation: + | resource | fileToShare.txt | + | space | Personal | + | sharee | grp1 | + | shareType | group | + | permissionsRole | File Editor | When user "Brian" moves file "/Shares/fileToShare.txt" to "/Shares/newFile.txt" using the WebDAV API Then the HTTP status code should be "201" And as "Brian" file "/Shares/newFile.txt" should exist @@ -198,7 +268,12 @@ Feature: sharing Given group "grp1" has been created And user "Alice" has created folder "PARENT" And user "Brian" has been added to group "grp1" - And user "Alice" has shared folder "PARENT" with group "grp1" + And user "Alice" has sent the following resource share invitation: + | resource | PARENT | + | space | Personal | + | sharee | grp1 | + | shareType | group | + | permissionsRole | Viewer | When user "Brian" moves folder "/Shares/PARENT" to "/Shares/myFolder" using the WebDAV API Then the HTTP status code should be "201" And as "Brian" folder "/Shares/myFolder" should exist @@ -209,7 +284,12 @@ Feature: sharing Given group "grp1" has been created And user "Brian" has been added to group "grp1" And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "fileToShare.txt" - And user "Alice" has shared file "fileToShare.txt" with group "grp1" with permissions "read,update" + And user "Alice" has sent the following resource share invitation: + | resource | fileToShare.txt | + | space | Personal | + | sharee | grp1 | + | shareType | group | + | permissionsRole | File Editor | When user "Brian" moves folder "/Shares/fileToShare.txt" to "/Shares/newFile.txt" using the WebDAV API Then the HTTP status code should be "201" And as "Brian" file "/Shares/newFile.txt" should exist @@ -220,7 +300,12 @@ Feature: sharing Given group "grp1" has been created And user "Alice" has created folder "PARENT" And user "Brian" has been added to group "grp1" - And user "Alice" has shared folder "PARENT" with group "grp1" with permissions "read,change" + And user "Alice" has sent the following resource share invitation: + | resource | PARENT | + | space | Personal | + | sharee | grp1 | + | shareType | group | + | permissionsRole | Editor | When user "Brian" moves folder "/Shares/PARENT" to "/Shares/myFolder" using the WebDAV API Then the HTTP status code should be "201" And as "Brian" folder "/Shares/myFolder" should exist @@ -231,7 +316,12 @@ Feature: sharing Given group "grp1" has been created And user "Brian" has been added to group "grp1" And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "fileToShare.txt" - And user "Alice" has shared file "fileToShare.txt" with group "grp1" with permissions "read" + And user "Alice" has sent the following resource share invitation: + | resource | fileToShare.txt | + | space | Personal | + | sharee | grp1 | + | shareType | group | + | permissionsRole | Viewer | When user "Brian" moves file "/Shares/fileToShare.txt" to "/Shares/newFile.txt" using the WebDAV API Then the HTTP status code should be "201" And as "Brian" file "/Shares/newFile.txt" should exist @@ -242,7 +332,12 @@ Feature: sharing Given group "grp1" has been created And user "Alice" has created folder "PARENT" And user "Brian" has been added to group "grp1" - And user "Alice" has shared folder "PARENT" with group "grp1" with permissions "read" + And user "Alice" has sent the following resource share invitation: + | resource | PARENT | + | space | Personal | + | sharee | grp1 | + | shareType | group | + | permissionsRole | Viewer | When user "Brian" moves folder "/Shares/PARENT" to "/Shares/myFolder" using the WebDAV API Then the HTTP status code should be "201" And as "Brian" folder "/Shares/myFolder" should exist @@ -254,7 +349,12 @@ Feature: sharing And user "Carol" has been added to group "grp1" And user "Alice" has created folder "" And user "Alice" has created folder "" - And user "Alice" has shared folder "" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | When user "Brian" moves folder "/Shares/" to "/Shares/" using the WebDAV API Then the HTTP status code should be "201" And as "Alice" folder "" should not exist @@ -277,7 +377,12 @@ Feature: sharing And user "Alice" has created folder "" And user "Alice" has uploaded file with content "thisIsAFileInsideTheSharedFolder" to "//fileInside" And user "Alice" has uploaded file with content "thisIsAFileInsideTheSharedFolder" to "//fileInside" - And user "Alice" has shared folder "" with user "Brian" with permissions "read,change" + And user "Alice" has sent the following resource share invitation: + | resource | | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | When user "Brian" moves folder "/Shares//fileInside" to "/Shares//" using the WebDAV API Then the HTTP status code should be "201" And as "Alice" file "/" should exist diff --git a/tests/acceptance/features/coreApiShareManagementToShares/moveShareInsideAnotherShare.feature b/tests/acceptance/features/coreApiShareManagementToShares/moveShareInsideAnotherShare.feature index 0c16fe0f04..fbf808788b 100644 --- a/tests/acceptance/features/coreApiShareManagementToShares/moveShareInsideAnotherShare.feature +++ b/tests/acceptance/features/coreApiShareManagementToShares/moveShareInsideAnotherShare.feature @@ -14,8 +14,18 @@ Feature: moving a share inside another share And user "Alice" has created folder "folderB" And user "Alice" has uploaded file with content "text A" to "/folderA/fileA.txt" And user "Alice" has uploaded file with content "text B" to "/folderB/fileB.txt" - And user "Alice" has shared folder "folderA" with user "Brian" - And user "Alice" has shared folder "folderB" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | folderA | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | + And user "Alice" has sent the following resource share invitation: + | resource | folderB | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | Scenario: share receiver cannot move a whole share inside another share