test: adjust MOVE between spaces test expectations

This commit is contained in:
Sawjan Gurung
2024-01-26 20:56:39 +05:45
parent b7635f59ee
commit 921f7d9d20
5 changed files with 19 additions and 20 deletions
@@ -94,8 +94,8 @@ Feature: moving/renaming file using file id
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 "folder" inside space "Shares" using file-id path "<dav-path>"
Then the HTTP status code should be "403"
And the value of the item "/d:error/s:message" in the response about user "Brian" should be "cross storage moves are not permitted, use copy and delete"
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 "/" 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:
@@ -351,7 +351,7 @@ Feature: moving/renaming file using file id
And user "Alice" has created folder "testshare"
And user "Alice" has shared folder "testshare" with user "Brian" with permissions "<permissions>"
When user "Brian" moves a file "textfile.txt" into "testshare" inside space "Shares" using file-id path "<dav-path>"
Then the HTTP status code should be "403"
Then the HTTP status code should be "502"
And for user "Brian" folder "/" of the space "project-space" should contain these files:
| textfile.txt |
But for user "Brian" folder "testshare" of the space "Shares" should not contain these files:
@@ -475,7 +475,7 @@ Feature: moving/renaming file using file id
And we save it into "FILEID"
And user "Alice" has shared folder "folder" with user "Brian" with permissions "read"
When user "Brian" moves a file "Shares/folder/test.txt" into "folder/sub-folder" inside space "Shares" using file-id path "<dav-path>"
Then the HTTP status code should be "403"
Then the HTTP status code should be "502"
And for user "Brian" folder "folder/sub-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 not contain these files:
@@ -499,7 +499,7 @@ Feature: moving/renaming file using file id
And user "Alice" has shared folder "testshare1" with user "Brian" with permissions "<from_permissions>"
And user "Alice" has shared folder "testshare2" with user "Brian" with permissions "<to_permissions>"
When user "Brian" moves a file "Shares/testshare1/textfile.txt" into "testshare2" inside space "Shares" using file-id path "<dav-path>"
Then the HTTP status code should be "403"
Then the HTTP status code should be "502"
And for user "Brian" folder "testshare1" of the space "Shares" should contain these files:
| textfile.txt |
But for user "Brian" folder "testshare2" of the space "Shares" should not contain these files:
@@ -697,7 +697,7 @@ Feature: moving/renaming file using file id
And we save it into "FILEID"
And user "Alice" has shared folder "/folder" with user "Brian" with permissions "read"
When user "Brian" renames a file "Shares/folder/test.txt" into "folder/sub-folder/renamed.txt" inside space "Shares" using file-id path "<dav-path>"
Then the HTTP status code should be "403"
Then the HTTP status code should be "502"
And for user "Brian" folder "folder" of the space "Shares" should contain these files:
| test.txt |
But for user "Brian" folder "folder/sub-folder" of the space "Shares" should not contain these files:
@@ -125,7 +125,7 @@ Feature: move (rename) file
| role | <role> |
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
When user "Alice" moves file "project.txt" from space "Project" to "/testshare/project.txt" inside space "Shares" using the WebDAV API
Then the HTTP status code should be "403"
Then the HTTP status code should be "502"
And for user "Alice" the space "Project" should contain these entries:
| project.txt |
But for user "Alice" folder "testshare" of the space "Shares" should not contain these entries:
@@ -168,7 +168,7 @@ Feature: move (rename) file
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
And user "Alice" has uploaded file with content "personal content" to "personal.txt"
When user "Alice" moves file "personal.txt" from space "Personal" to "/testshare/personal.txt" inside space "Shares" using the WebDAV API
Then the HTTP status code should be "403"
Then the HTTP status code should be "502"
And for user "Alice" the space "Personal" should contain these entries:
| personal.txt |
But for user "Alice" folder "testshare" of the space "Shares" should not contain these entries:
@@ -185,7 +185,7 @@ Feature: move (rename) file
And user "Brian" has uploaded file with content "testshare content" to "/testshare/testshare.txt"
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
When user "Alice" moves file "/testshare/testshare.txt" from space "Shares" to "testshare.txt" inside space "Personal" using the WebDAV API
Then the HTTP status code should be "403"
Then the HTTP status code should be "502"
And for user "Alice" the space "Personal" should not contain these entries:
| testshare.txt |
And for user "Alice" folder "testshare" of the space "Shares" should contain these entries:
@@ -207,7 +207,7 @@ Feature: move (rename) file
And user "Brian" has uploaded file with content "testshare content" to "/testshare/testshare.txt"
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
When user "Alice" moves file "/testshare/testshare.txt" from space "Shares" to "testshare.txt" inside space "Project" using the WebDAV API
Then the HTTP status code should be "403"
Then the HTTP status code should be "502"
And for user "Alice" the space "Project" should not contain these entries:
| /testshare.txt |
And for user "Alice" folder "testshare" of the space "Shares" should contain these entries:
@@ -232,7 +232,7 @@ Feature: move (rename) file
And user "Brian" has shared folder "/testshare1" with user "Alice" with permissions "<from_permissions>"
And user "Brian" has shared folder "/testshare2" with user "Alice" with permissions "<to_permissions>"
When user "Alice" moves file "/testshare1/testshare1.txt" from space "Shares" to "/testshare2/testshare1.txt" inside space "Shares" using the WebDAV API
Then the HTTP status code should be "403"
Then the HTTP status code should be "502"
And for user "Alice" folder "testshare1" of the space "Shares" should contain these entries:
| testshare1.txt |
But for user "Alice" folder "testshare2" of the space "Shares" should not contain these entries:
@@ -20,7 +20,7 @@ Feature: moving a share inside another share
Scenario: share receiver cannot move a whole share inside another share
When user "Brian" moves folder "Shares/folderB" to "Shares/folderA/folderB" using the WebDAV API
Then the HTTP status code should be "403"
Then the HTTP status code should be "502"
And as "Alice" folder "/folderB" should exist
And as "Brian" folder "/Shares/folderB" should exist
And as "Alice" file "/folderB/fileB.txt" should exist
@@ -43,7 +43,7 @@ Feature: moving a share inside another share
And user "Brian" has created folder "localFolder/subFolder"
And user "Brian" has uploaded file with content "local text" to "/localFolder/localFile.txt"
When user "Brian" moves folder "localFolder" to "Shares/folderA/localFolder" using the WebDAV API
Then the HTTP status code should be "403"
Then the HTTP status code should be "502"
And as "Brian" folder "/Shares/folderA/localFolder" should not exist
And as "Alice" folder "/folderA/localFolder" should not exist
And as "Brian" folder "/localFolder" should exist
@@ -52,8 +52,7 @@ Feature: moving a share inside another share
Scenario: share receiver tries to move a whole share inside a local folder
Given user "Brian" has created folder "localFolder"
And user "Brian" has uploaded file with content "local text" to "/localFolder/localFile.txt"
# On oCIS you cannot move received shares out of the "Shares" folder
When user "Brian" moves folder "Shares/folderB" to "localFolder/folderB" using the WebDAV API
Then the HTTP status code should be "403"
Then the HTTP status code should be "502"
And as "Alice" file "/folderB/fileB.txt" should exist
And as "Brian" file "/Shares/folderB/fileB.txt" should exist
@@ -20,7 +20,7 @@ Feature: sharing
And user "Alice" has shared folder "/share1" with user "Brian"
And user "Alice" has shared folder "/share2" with user "Brian"
When user "Brian" moves file "/Shares/share1/textfile0.txt" to "/Shares/share2/textfile0.txt" using the WebDAV API
Then the HTTP status code should be "403"
Then the HTTP status code should be "502"
And as "Brian" file "/Shares/share1/textfile0.txt" should exist
And as "Alice" file "share1/textfile0.txt" should exist
But as "Brian" file "/Shares/share2/textfile0.txt" should not exist
@@ -45,7 +45,7 @@ Feature: move (rename) file
| shareWith | Alice |
And user "Alice" has uploaded file with content "test data" to "/testfile.txt"
When user "Alice" moves file "/testfile.txt" to "Shares/testshare/testfile.txt" using the WebDAV API
Then the HTTP status code should be "403"
Then the HTTP status code should be "502"
And as "Alice" file "Shares/testshare/testfile.txt" should not exist
And as "Brian" file "testshare/testfile.txt" should not exist
But as "Alice" file "/testfile.txt" should exist
@@ -95,7 +95,7 @@ Feature: move (rename) file
| permissions | <permissions> |
| shareWith | Alice |
When user "Alice" moves file "/Shares/testshare/testfile.txt" to "/testfile.txt" using the WebDAV API
Then the HTTP status code should be "403"
Then the HTTP status code should be "502"
And as "Alice" file "/Shares/testshare/testfile.txt" should exist
And as "Brian" file "/testshare/testfile.txt" should exist
Examples:
@@ -146,7 +146,7 @@ Feature: move (rename) file
And user "Alice" has created folder "/testsubfolder"
And user "Alice" has uploaded file with content "test data" to "/testsubfolder/testfile.txt"
When user "Alice" moves folder "/testsubfolder" to "Shares/testshare/testsubfolder" using the WebDAV API
Then the HTTP status code should be "403"
Then the HTTP status code should be "502"
And as "Alice" folder "/Shares/testshare/testsubfolder" should not exist
And as "Brian" folder "/testshare/testsubfolder" should not exist
But as "Alice" folder "/testsubfolder" should exist
@@ -202,7 +202,7 @@ Feature: move (rename) file
| permissions | <permissions> |
| shareWith | Alice |
When user "Alice" moves folder "/Shares/testshare/testsubfolder" to "/testsubfolder" using the WebDAV API
Then the HTTP status code should be "403"
Then the HTTP status code should be "502"
And as "Alice" folder "/Shares/testshare/testsubfolder" should exist
And as "Brian" folder "/testshare/testsubfolder" should exist
Examples: