diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml index 3ae8006c88c..ed3da785367 100644 --- a/tests/acceptance/config/behat.yml +++ b/tests/acceptance/config/behat.yml @@ -240,6 +240,7 @@ default: context: *common_ldap_suite_context contexts: - FeatureContext: *common_feature_context_params + - WebDavPropertiesContext: extensions: rdx\behatvars\BehatVariablesExtension: ~ diff --git a/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature b/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature index ee05858cd4e..db69d1a6fb5 100644 --- a/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature +++ b/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature @@ -150,6 +150,28 @@ Feature: moving/renaming file using file id | /dav/spaces/<> | + Scenario Outline: move a file between two project spaces + Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "first-project-space" with the default quota using the Graph API + And user "Alice" has created a space "second-project-space" with the default quota using the Graph API + And user "Alice" has uploaded a file inside space "first-project-space" with content "data from first project space" to "firstProjectSpacetextfile.txt" + And user "Alice" has uploaded a file inside space "second-project-space" with content "data from second project space" to "secondProjectSpacetextfile.txt" + And we save it into "FILEID" + When user "Alice" moves a file "/secondProjectSpacetextfile.txt" into "/" inside space "first-project-space" using file-id path "" + Then the HTTP status code should be "502" + And the value of the item "/d:error/s:message" in the response about user "Alice" should be "move:error: not supported: cannot move across spaces" + And for user "Alice" folder "/" of the space "first-project-space" should contain these files: + | firstProjectSpacetextfile.txt | + And for user "Alice" folder "/" of the space "second-project-space" should contain these files: + | secondProjectSpacetextfile.txt | + But for user "Alice" the space "first-project-space" should not contain these entries: + | secondProjectSpacetextfile.txt | + Examples: + | dav-path | + | /remote.php/dav/spaces/<> | + | /dav/spaces/<> | + + Scenario Outline: rename a root file inside personal space Given user "Alice" has uploaded file with content "some data" to "textfile.txt" And we save it into "FILEID" @@ -229,3 +251,25 @@ Feature: moving/renaming file using file id | dav-path | | /remote.php/dav/spaces/<> | | /dav/spaces/<> | + + + Scenario Outline: rename a file and move a file between project spaces + Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "first-project-space" with the default quota using the Graph API + And user "Alice" has created a space "second-project-space" with the default quota using the Graph API + And user "Alice" has uploaded a file inside space "first-project-space" with content "data from first project space" to "firstProjectSpacetextfile.txt" + And user "Alice" has uploaded a file inside space "second-project-space" with content "data from second project space" to "secondProjectSpacetextfile.txt" + And we save it into "FILEID" + When user "Alice" renames a file "/secondProjectSpacetextfile.txt" into "/renamedSecondProjectSpacetextfile.txt" inside space "first-project-space" using file-id path "" + Then the HTTP status code should be "502" + And the value of the item "/d:error/s:message" in the response about user "Alice" should be "move:error: not supported: cannot move across spaces" + And for user "Alice" folder "/" of the space "first-project-space" should contain these files: + | firstProjectSpacetextfile.txt | + And for user "Alice" folder "/" of the space "second-project-space" should contain these files: + | secondProjectSpacetextfile.txt | + But for user "Alice" the space "first-project-space" should not contain these entries: + | renamedSecondProjectSpacetextfile.txt | + Examples: + | dav-path | + | /remote.php/dav/spaces/<> | + | /dav/spaces/<> |