From cd09d444fd20042a5bca91eac71fc3537d4ec6ab Mon Sep 17 00:00:00 2001 From: Nalem7 <61624650+nabim777@users.noreply.github.com> Date: Mon, 27 Nov 2023 11:35:31 +0545 Subject: [PATCH] add tests for move file within shares using file-id (#7776) --- tests/acceptance/config/behat.yml | 1 + .../moveByFileId.feature | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml index 517b16a14..d9883e9f9 100644 --- a/tests/acceptance/config/behat.yml +++ b/tests/acceptance/config/behat.yml @@ -236,6 +236,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 ee05858cd..8c50b37bc 100644 --- a/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature +++ b/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature @@ -150,6 +150,31 @@ Feature: moving/renaming file using file id | /dav/spaces/<> | + Scenario Outline: move a file from sub-folder to root folder inside shares 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 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 "Brian" has accepted share "/folder" offered by user "Alice" + When user "Brian" moves 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 "502" + And the value of the item "/d:error/s:message" in the response about user "Brian" should be "gateway does not support cross storage move, use copy and delete" + And for user "Brian" folder "folder/sub-folder" of the space "Shares" should contain these files: + | test.txt | + And for user "Brian" folder "folder" of the space "Shares" should not contain these files: + | test.txt | + And for user "Alice" folder "folder/sub-folder" of the space "Personal" should contain these files: + | test.txt | + And for user "Alice" folder "folder" of the space "Personal" should not contain these files: + | test.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"