From 1c8833cd179f86a115054e4636dedfe300cd2ac7 Mon Sep 17 00:00:00 2001 From: Nalem7 <61624650+nabim777@users.noreply.github.com> Date: Tue, 28 Nov 2023 09:47:40 +0545 Subject: [PATCH] Backport add test for rename and move the file between personal and share space using fileid (#7813) --- .../moveByFileId.feature | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature b/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature index 035917cc40..a65e95af75 100644 --- a/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature +++ b/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature @@ -171,6 +171,46 @@ Feature: moving/renaming file using file id | /dav/spaces/<> | + Scenario Outline: move 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 "Brian" has accepted share "/folder" offered by user "Alice" + And user "Brian" has uploaded file with content "some data" to "/test.txt" + And we save it into "FILEID" + When user "Brian" moves a file "/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 "/" of the space "Personal" should contain these files: + | test.txt | + But 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: move a file from share to personal 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 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 "Brian" has accepted share "/folder" offered by user "Alice" + When user "Brian" moves a file "Shares/folder/test.txt" into "/" inside space "Personal" 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 "move:error: not supported: cannot move across spaces" + And for user "Brian" folder "folder" of the space "Shares" should contain these files: + | test.txt | + And for user "Brian" 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" @@ -219,6 +259,27 @@ Feature: moving/renaming file using file id | /dav/spaces/<> | + Scenario Outline: move a file to a different name into a sub-folder inside 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 created folder "/folder/sub-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 "Brian" has accepted share "/folder" offered by user "Alice" + When user "Brian" renames a file "Shares/folder/test.txt" into "Shares/folder/sub-folder/renamed.txt" 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" of the space "Shares" should contain these files: + | test.txt | + And for user "Brian" folder "folder/sub-folder" of the space "Shares" should not contain these files: + | renamed.txt | + Examples: + | dav-path | + | /remote.php/dav/spaces/<> | + | /dav/spaces/<> | + + Scenario Outline: rename a file and move from a folder to root inside personal space Given user "Alice" has created folder "/folder" And user "Alice" has uploaded file with content "some data" to "folder/textfile.txt"