Merge remote-tracking branch 'upstream/master' into merge-stable-5.0
This commit is contained in:
@@ -21,7 +21,6 @@ Feature: checking file versions using file id
|
||||
| path | text.txt |
|
||||
| shareWith | Brian |
|
||||
| role | <role> |
|
||||
And using new DAV path
|
||||
When user "Alice" gets the number of versions of file "/text.txt" using file-id path "/meta/<<FILEID>>/v"
|
||||
Then the HTTP status code should be "207"
|
||||
And the number of versions should be "1"
|
||||
@@ -38,7 +37,6 @@ Feature: checking file versions using file id
|
||||
Given user "Alice" has shared a space "Project1" with settings:
|
||||
| shareWith | Brian |
|
||||
| role | <role> |
|
||||
And using new DAV path
|
||||
When user "Alice" gets the number of versions of file "/text.txt" using file-id path "/meta/<<FILEID>>/v"
|
||||
Then the HTTP status code should be "207"
|
||||
And the number of versions should be "1"
|
||||
@@ -55,11 +53,10 @@ Feature: checking file versions using file id
|
||||
Given user "Alice" has shared a space "Project1" with settings:
|
||||
| shareWith | Brian |
|
||||
| role | viewer |
|
||||
And using new DAV path
|
||||
When user "Brian" tries to get the number of versions of file "/text.txt" using file-id path "/meta/<<FILEID>>/v"
|
||||
Then the HTTP status code should be "403"
|
||||
|
||||
|
||||
@issue-7738
|
||||
Scenario Outline: check the versions of a file after moving to a shared folder inside a project space as editor/viewer
|
||||
Given user "Alice" has created a folder "testFolder" in space "Project1"
|
||||
And user "Alice" has created a share inside of space "Project1" with settings:
|
||||
@@ -67,7 +64,6 @@ Feature: checking file versions using file id
|
||||
| shareWith | Brian |
|
||||
| role | <role> |
|
||||
And user "Alice" has moved file "text.txt" to "/testFolder/movedText.txt" in space "Project1"
|
||||
And using new DAV path
|
||||
When user "Alice" gets the number of versions of file "/testFolder/movedText.txt" using file-id path "/meta/<<FILEID>>/v"
|
||||
Then the HTTP status code should be "207"
|
||||
And the number of versions should be "1"
|
||||
@@ -78,7 +74,7 @@ Feature: checking file versions using file id
|
||||
| editor |
|
||||
| viewer |
|
||||
|
||||
|
||||
@issue-7738
|
||||
Scenario: check the versions of a file after moving it to a shared folder of a project space shared with all permissions
|
||||
Given user "Alice" has created a folder "testFolder" in space "Project1"
|
||||
And user "Alice" has created a share inside of space "Project1" with settings:
|
||||
@@ -86,7 +82,68 @@ Feature: checking file versions using file id
|
||||
| shareWith | Brian |
|
||||
| role | all |
|
||||
And user "Alice" has moved file "text.txt" to "/testFolder/movedText.txt" in space "Project1"
|
||||
And using new DAV path
|
||||
When user "Brian" gets the number of versions of file "/text.txt" using file-id path "/meta/<<FILEID>>/v"
|
||||
Then the HTTP status code should be "207"
|
||||
And the number of versions should be "1"
|
||||
|
||||
@issue-777
|
||||
Scenario Outline: check file versions after moving to-and-from folder in personal space
|
||||
Given user "Alice" has created folder "folder"
|
||||
And user "Alice" has uploaded file with content "some data" to "<from>textfile.txt"
|
||||
And user "Alice" has uploaded file with content "some data - edited" to "<from>textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has moved file "<from>textfile.txt" to "<to>textfile.txt" in space "Personal"
|
||||
When user "Alice" gets the number of versions of file "<to>textfile.txt" using file-id path "/meta/<<FILEID>>/v"
|
||||
Then the HTTP status code should be "207"
|
||||
And the number of versions should be "1"
|
||||
Examples:
|
||||
| from | to |
|
||||
| / | folder/ |
|
||||
| folder/ | / |
|
||||
|
||||
@issue-777
|
||||
Scenario Outline: check file versions after moving to-and-from folder in personal space (MOVE using file-id)
|
||||
Given user "Alice" has created folder "folder"
|
||||
And user "Alice" has uploaded file with content "some data" to "<from>textfile.txt"
|
||||
And user "Alice" has uploaded file with content "some data - edited" to "<from>textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
When user "Alice" moves a file "<from>textfile.txt" into "<to>" inside space "Personal" using file-id path "/dav/spaces/<<FILEID>>"
|
||||
Then the HTTP status code should be "201"
|
||||
When user "Alice" gets the number of versions of file "<to>textfile.txt" using file-id path "/meta/<<FILEID>>/v"
|
||||
Then the HTTP status code should be "207"
|
||||
And the number of versions should be "1"
|
||||
Examples:
|
||||
| from | to |
|
||||
| / | folder/ |
|
||||
| folder/ | / |
|
||||
|
||||
@issue-777
|
||||
Scenario Outline: check file versions after moving to-and-from folder in project space
|
||||
Given user "Alice" has created a folder "folder" in space "Project1"
|
||||
And user "Alice" has uploaded a file inside space "Project1" with content "some data" to "<from>textfile.txt"
|
||||
And user "Alice" has uploaded a file inside space "Project1" with content "some data - edited" to "<from>textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has moved file "<from>textfile.txt" to "<to>textfile.txt" in space "Project1"
|
||||
When user "Alice" gets the number of versions of file "<from>textfile.txt" using file-id path "/meta/<<FILEID>>/v"
|
||||
Then the HTTP status code should be "207"
|
||||
And the number of versions should be "1"
|
||||
Examples:
|
||||
| from | to |
|
||||
| / | folder/ |
|
||||
| folder/ | / |
|
||||
|
||||
@issue-777
|
||||
Scenario Outline: check file versions after moving to-and-from folder in project space (MOVE using file-id)
|
||||
And user "Alice" has created a folder "folder" in space "Project1"
|
||||
And user "Alice" has uploaded a file inside space "Project1" with content "some data" to "<from>textfile.txt"
|
||||
And user "Alice" has uploaded a file inside space "Project1" with content "some data - edited" to "<from>textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
When user "Alice" moves a file "<from>textfile.txt" into "<to>" inside space "Project1" using file-id path "/dav/spaces/<<FILEID>>"
|
||||
Then the HTTP status code should be "201"
|
||||
When user "Alice" gets the number of versions of file "<to>textfile.txt" using file-id path "/meta/<<FILEID>>/v"
|
||||
Then the HTTP status code should be "207"
|
||||
And the number of versions should be "1"
|
||||
Examples:
|
||||
| from | to |
|
||||
| / | folder/ |
|
||||
| folder/ | / |
|
||||
|
||||
@@ -73,19 +73,149 @@ Feature: moving/renaming file using file id
|
||||
| /remote.php/dav/spaces/<<FILEID>> |
|
||||
| /dav/spaces/<<FILEID>> |
|
||||
|
||||
@issue-1976
|
||||
Scenario Outline: try to move a file into same folder with same name
|
||||
And user "Alice" has uploaded file with content "some data" to "textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
When user "Alice" moves a file "textfile.txt" into "/" inside space "Personal" using file-id path "<dav-path>"
|
||||
Then the HTTP status code should be "403"
|
||||
And as "Alice" file "textfile.txt" should not exist in the trashbin of the space "Personal"
|
||||
And for user "Alice" the content of the file "textfile.txt" of the space "Personal" should be "some data"
|
||||
Examples:
|
||||
| dav-path |
|
||||
| /remote.php/dav/spaces/<<FILEID>> |
|
||||
| /dav/spaces/<<FILEID>> |
|
||||
|
||||
Scenario Outline: move a file into a folder inside project space
|
||||
|
||||
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 "<permissions>"
|
||||
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"
|
||||
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:
|
||||
| permissions | dav-path |
|
||||
| all | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| all | /dav/spaces/<<FILEID>> |
|
||||
| change | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| change | /dav/spaces/<<FILEID>> |
|
||||
| read | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| read | /dav/spaces/<<FILEID>> |
|
||||
|
||||
@issue-7618
|
||||
Scenario Outline: move a file from personal to project space
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "project-space" with the default quota using the Graph API
|
||||
And user "Brian" has uploaded a file inside space "Personal" with content "some data" to "textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has shared a space "project-space" with settings:
|
||||
| shareWith | Brian |
|
||||
| role | <role> |
|
||||
When user "Brian" moves a file "textfile.txt" into "/" inside space "project-space" using file-id path "<dav-path>"
|
||||
Then the HTTP status code should be "<http-status-code>"
|
||||
And for user "Brian" folder "/" of the space "Personal" should contain these files:
|
||||
| textfile.txt |
|
||||
But for user "Brian" folder "/" of the space "project-space" should not contain these files:
|
||||
| textfile.txt |
|
||||
Examples:
|
||||
| role | http-status-code | dav-path |
|
||||
| manager | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| editor | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| viewer | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| manager | 403 | /dav/spaces/<<FILEID>> |
|
||||
| editor | 403 | /dav/spaces/<<FILEID>> |
|
||||
| viewer | 403 | /dav/spaces/<<FILEID>> |
|
||||
|
||||
@issue-7618
|
||||
Scenario Outline: move a file to different name from personal space to project space
|
||||
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "project-space" with the default quota using the Graph API
|
||||
And user "Alice" has uploaded a file inside space "Personal" with content "some data" to "textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
When user "Alice" renames a file "/textfile.txt" into "/renamed.txt" inside space "project-space" 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 "Alice" should be "move:error: not supported: cannot move across spaces"
|
||||
And for user "Alice" folder "/" of the space "Personal" should contain these files:
|
||||
| textfile.txt |
|
||||
But for user "Alice" folder "/" of the space "project-space" should not contain these files:
|
||||
| renamed.txt |
|
||||
Examples:
|
||||
| dav-path |
|
||||
| /remote.php/dav/spaces/<<FILEID>> |
|
||||
| /dav/spaces/<<FILEID>> |
|
||||
|
||||
|
||||
Scenario Outline: move a file into a folder inside project space (manager/editor)
|
||||
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has created a space "project-space" with the default quota using the Graph API
|
||||
And user "Alice" has created a folder "/folder" in space "project-space"
|
||||
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
When user "Alice" moves a file "/textfile.txt" into "/folder" inside space "project-space" using file-id path "<dav-path>"
|
||||
And user "Alice" has shared a space "project-space" with settings:
|
||||
| shareWith | Brian |
|
||||
| role | <role> |
|
||||
When user "Brian" moves a file "/textfile.txt" into "/folder" inside space "project-space" using file-id path "<dav-path>"
|
||||
Then the HTTP status code should be "201"
|
||||
And for user "Alice" folder "folder" of the space "project-space" should contain these files:
|
||||
| textfile.txt |
|
||||
But for user "Alice" the space "project-space" should not contain these entries:
|
||||
| textfile.txt |
|
||||
Examples:
|
||||
| role | dav-path |
|
||||
| manager | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| editor | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| manager | /dav/spaces/<<FILEID>> |
|
||||
| editor | /dav/spaces/<<FILEID>> |
|
||||
|
||||
@issue-1976
|
||||
Scenario Outline: try to move a file within a project space into a folder with same name
|
||||
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has created a space "project-space" with the default quota using the Graph API
|
||||
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has shared a space "project-space" with settings:
|
||||
| shareWith | Brian |
|
||||
| role | <role> |
|
||||
When user "Brian" moves a file "textfile.txt" into "/" inside space "project-space" using file-id path "<dav-path>"
|
||||
Then the HTTP status code should be "403"
|
||||
And as "Alice" file "textfile.txt" should not exist in the trashbin of the space "project-space"
|
||||
And for user "Brian" the content of the file "textfile.txt" of the space "project-space" should be "some data"
|
||||
Examples:
|
||||
| role | dav-path |
|
||||
| manager | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| editor | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| viewer | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| manager | /dav/spaces/<<FILEID>> |
|
||||
| editor | /dav/spaces/<<FILEID>> |
|
||||
| viewer | /dav/spaces/<<FILEID>> |
|
||||
|
||||
|
||||
Scenario Outline: try to move a file into a folder inside project space (viewer)
|
||||
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has created a space "project-space" with the default quota using the Graph API
|
||||
And user "Alice" has created a folder "/folder" in space "project-space"
|
||||
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has shared a space "project-space" with settings:
|
||||
| shareWith | Brian |
|
||||
| role | viewer |
|
||||
When user "Brian" moves a file "/textfile.txt" into "/folder" inside space "project-space" using file-id path "<dav-path>"
|
||||
Then the HTTP status code should be "403"
|
||||
And for user "Alice" the space "project-space" should contain these entries:
|
||||
| textfile.txt |
|
||||
But for user "Alice" folder "folder" of the space "project-space" should not contain these files:
|
||||
| textfile.txt |
|
||||
Examples:
|
||||
| dav-path |
|
||||
| /remote.php/dav/spaces/<<FILEID>> |
|
||||
@@ -145,91 +275,318 @@ Feature: moving/renaming file using file id
|
||||
| /remote.php/dav/spaces/<<FILEID>> |
|
||||
| /dav/spaces/<<FILEID>> |
|
||||
|
||||
|
||||
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"
|
||||
When user "Brian" moves a file "Shares/folder/sub-folder/test.txt" into "Shares/folder" inside space "Shares" using file-id path "<dav-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/<<FILEID>> |
|
||||
| /dav/spaces/<<FILEID>> |
|
||||
|
||||
|
||||
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 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 "<dav-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/<<FILEID>> |
|
||||
| /dav/spaces/<<FILEID>> |
|
||||
|
||||
|
||||
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"
|
||||
When user "Brian" moves a file "Shares/folder/test.txt" into "/" inside space "Personal" using file-id path "<dav-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/<<FILEID>> |
|
||||
| /dav/spaces/<<FILEID>> |
|
||||
|
||||
|
||||
@issue-8116
|
||||
Scenario Outline: move a file between two project spaces
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
And 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 "first project space" to "file.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has shared a space "first-project-space" with settings:
|
||||
| shareWith | Brian |
|
||||
| role | <from_role> |
|
||||
And user "Alice" has shared a space "second-project-space" with settings:
|
||||
| shareWith | Brian |
|
||||
| role | <to_role> |
|
||||
When user "Brian" moves a file "file.txt" into "/" inside space "second-project-space" using file-id path "<dav-path>"
|
||||
Then the HTTP status code should be "<http-status-code>"
|
||||
And for user "Brian" the space "second-project-space" should not contain these entries:
|
||||
| file.txt |
|
||||
But for user "Brian" the space "first-project-space" should contain these entries:
|
||||
| file.txt |
|
||||
Examples:
|
||||
| from_role | to_role | http-status-code | dav-path |
|
||||
| manager | manager | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| editor | manager | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| manager | editor | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| editor | editor | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| manager | viewer | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| editor | viewer | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| viewer | manager | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| viewer | editor | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| viewer | viewer | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| manager | manager | 403 | /dav/spaces/<<FILEID>> |
|
||||
| editor | manager | 403 | /dav/spaces/<<FILEID>> |
|
||||
| manager | editor | 403 | /dav/spaces/<<FILEID>> |
|
||||
| editor | editor | 403 | /dav/spaces/<<FILEID>> |
|
||||
| manager | viewer | 403 | /dav/spaces/<<FILEID>> |
|
||||
| editor | viewer | 403 | /dav/spaces/<<FILEID>> |
|
||||
| viewer | manager | 403 | /dav/spaces/<<FILEID>> |
|
||||
| viewer | editor | 403 | /dav/spaces/<<FILEID>> |
|
||||
| viewer | viewer | 403 | /dav/spaces/<<FILEID>> |
|
||||
|
||||
@issue-8116
|
||||
Scenario Outline: move a file to different name 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" moves a file "/secondProjectSpacetextfile.txt" into "/" inside space "first-project-space" using file-id path "<dav-path>"
|
||||
Then the HTTP status code should be "502"
|
||||
When user "Alice" renames a file "/secondProjectSpacetextfile.txt" into "/renamedSecondProjectSpacetextfile.txt" inside space "first-project-space" 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 "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 |
|
||||
| renamedSecondProjectSpacetextfile.txt |
|
||||
Examples:
|
||||
| dav-path |
|
||||
| /remote.php/dav/spaces/<<FILEID>> |
|
||||
| /dav/spaces/<<FILEID>> |
|
||||
|
||||
|
||||
Scenario Outline: move a file from project to shares space
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "project-space" with the default quota using the Graph API
|
||||
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has shared a space "project-space" with settings:
|
||||
| shareWith | Brian |
|
||||
| role | <role> |
|
||||
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"
|
||||
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:
|
||||
| textfile.txt |
|
||||
Examples:
|
||||
| role | permissions | dav-path |
|
||||
| manager | all | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| editor | all | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| viewer | all | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| manager | change | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| editor | change | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| viewer | change | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| manager | read | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| editor | read | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| viewer | read | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| manager | all | /dav/spaces/<<FILEID>> |
|
||||
| editor | all | /dav/spaces/<<FILEID>> |
|
||||
| viewer | all | /dav/spaces/<<FILEID>> |
|
||||
| manager | change | /dav/spaces/<<FILEID>> |
|
||||
| editor | change | /dav/spaces/<<FILEID>> |
|
||||
| viewer | change | /dav/spaces/<<FILEID>> |
|
||||
| manager | read | /dav/spaces/<<FILEID>> |
|
||||
| editor | read | /dav/spaces/<<FILEID>> |
|
||||
| viewer | read | /dav/spaces/<<FILEID>> |
|
||||
|
||||
@issue-7618
|
||||
Scenario Outline: move a file from project to personal space
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "project-space" with the default quota using the Graph API
|
||||
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has shared a space "project-space" with settings:
|
||||
| shareWith | Brian |
|
||||
| role | <role> |
|
||||
When user "Brian" moves a file "/textfile.txt" into "/" inside space "Personal" using file-id path "<dav-path>"
|
||||
Then the HTTP status code should be "<http-status-code>"
|
||||
And for user "Brian" folder "/" of the space "project-space" should contain these files:
|
||||
| textfile.txt |
|
||||
But for user "Brian" folder "/" of the space "Personal" should not contain these files:
|
||||
| textfile.txt |
|
||||
Examples:
|
||||
| role | http-status-code | dav-path |
|
||||
| manager | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| editor | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| viewer | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| manager | 403 | /dav/spaces/<<FILEID>> |
|
||||
| editor | 403 | /dav/spaces/<<FILEID>> |
|
||||
| viewer | 403 | /dav/spaces/<<FILEID>> |
|
||||
|
||||
@issue-7618
|
||||
Scenario Outline: move a file to different name from project space to personal space
|
||||
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "project-space" with the default quota using the Graph API
|
||||
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
When user "Alice" renames a file "/textfile.txt" into "/renamed.txt" inside space "Personal" 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 "Alice" should be "move:error: not supported: cannot move across spaces"
|
||||
And for user "Alice" folder "/" of the space "project-space" should contain these files:
|
||||
| textfile.txt |
|
||||
But for user "Alice" folder "/" of the space "Personal" should not contain these files:
|
||||
| renamed.txt |
|
||||
Examples:
|
||||
| dav-path |
|
||||
| /remote.php/dav/spaces/<<FILEID>> |
|
||||
| /dav/spaces/<<FILEID>> |
|
||||
|
||||
@issue-7617
|
||||
Scenario Outline: move a file into a folder within a shared folder (all/change permissions)
|
||||
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 "<permissions>"
|
||||
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 "201"
|
||||
And for user "Brian" folder "folder/sub-folder" of the space "Shares" should contain these files:
|
||||
| test.txt |
|
||||
And for user "Alice" folder "folder/sub-folder" of the space "Personal" should contain these files:
|
||||
| test.txt |
|
||||
But for user "Brian" folder "folder" of the space "Shares" should not contain these files:
|
||||
| test.txt |
|
||||
And for user "Alice" folder "folder" of the space "Personal" should not contain these files:
|
||||
| test.txt |
|
||||
Examples:
|
||||
| permissions | dav-path |
|
||||
| all | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| all | /dav/spaces/<<FILEID>> |
|
||||
| change | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| change | /dav/spaces/<<FILEID>> |
|
||||
|
||||
@issue-1976
|
||||
Scenario Outline: sharee tries to move a file into same shared folder with same name
|
||||
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 "<permissions>"
|
||||
When user "Brian" moves a file "Shares/folder/test.txt" into "folder" inside space "Shares" using file-id path "<dav-path>"
|
||||
Then the HTTP status code should be "403"
|
||||
And as "Alice" file "test.txt" should not exist in the trashbin of the space "Personal"
|
||||
And for user "Brian" the content of the file "folder/test.txt" of the space "Shares" should be "some data"
|
||||
And for user "Alice" the content of the file "folder/test.txt" of the space "Personal" should be "some data"
|
||||
Examples:
|
||||
| permissions | dav-path |
|
||||
| all | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| all | /dav/spaces/<<FILEID>> |
|
||||
| change | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| change | /dav/spaces/<<FILEID>> |
|
||||
| read | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| read | /dav/spaces/<<FILEID>> |
|
||||
|
||||
|
||||
Scenario Outline: try to move a file into a folder within a shared folder (read permissions)
|
||||
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 "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"
|
||||
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:
|
||||
| test.txt |
|
||||
But for user "Brian" folder "folder" of the space "Shares" should contain these files:
|
||||
| test.txt |
|
||||
And for user "Alice" folder "folder" of the space "Personal" should contain these files:
|
||||
| test.txt |
|
||||
Examples:
|
||||
| dav-path |
|
||||
| /remote.php/dav/spaces/<<FILEID>> |
|
||||
| /dav/spaces/<<FILEID>> |
|
||||
|
||||
|
||||
Scenario Outline: move a file from one shared folder to another shared folder
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has created folder "testshare1"
|
||||
And user "Alice" has created folder "testshare2"
|
||||
And user "Alice" has uploaded file with content "some data" to "testshare1/textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
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"
|
||||
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:
|
||||
| textfile.txt |
|
||||
Examples:
|
||||
| from_permissions | to_permissions | dav-path |
|
||||
| all | all | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| all | change | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| all | read | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| change | all | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| change | change | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| change | read | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| read | all | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| read | change | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| read | read | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| all | all | /dav/spaces/<<FILEID>> |
|
||||
| all | change | /dav/spaces/<<FILEID>> |
|
||||
| all | read | /dav/spaces/<<FILEID>> |
|
||||
| change | all | /dav/spaces/<<FILEID>> |
|
||||
| change | change | /dav/spaces/<<FILEID>> |
|
||||
| change | read | /dav/spaces/<<FILEID>> |
|
||||
| read | all | /dav/spaces/<<FILEID>> |
|
||||
| read | change | /dav/spaces/<<FILEID>> |
|
||||
| read | read | /dav/spaces/<<FILEID>> |
|
||||
|
||||
@issue-8124
|
||||
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 "<permissions>"
|
||||
When user "Brian" moves a file "Shares/folder/test.txt" into "/" inside space "Personal" using file-id path "<dav-path>"
|
||||
Then the HTTP status code should be "<http-status-code>"
|
||||
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:
|
||||
| permissions | dav-path | http-status-code |
|
||||
| all | /remote.php/dav/spaces/<<FILEID>> | 403 |
|
||||
| all | /dav/spaces/<<FILEID>> | 403 |
|
||||
| change | /remote.php/dav/spaces/<<FILEID>> | 403 |
|
||||
| change | /dav/spaces/<<FILEID>> | 403 |
|
||||
| read | /remote.php/dav/spaces/<<FILEID>> | 403 |
|
||||
| read | /dav/spaces/<<FILEID>> | 403 |
|
||||
|
||||
@issue-8125
|
||||
Scenario Outline: move a file from shares to project space
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "project-space" with the default quota using the Graph API
|
||||
And user "Alice" has shared a space "project-space" with settings:
|
||||
| shareWith | Brian |
|
||||
| role | <role> |
|
||||
And user "Alice" has created folder "testshare"
|
||||
And user "Alice" has uploaded file with content "some data" to "testshare/textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has shared folder "testshare" with user "Brian" with permissions "<permissions>"
|
||||
When user "Brian" moves a file "Shares/testshare/textfile.txt" into "/" inside space "project-space" using file-id path "<dav-path>"
|
||||
Then the HTTP status code should be "<http-status-code>"
|
||||
And for user "Brian" folder "testshare" of the space "Shares" should contain these files:
|
||||
| textfile.txt |
|
||||
But for user "Brian" folder "/" of the space "project-space" should not contain these files:
|
||||
| textfile.txt |
|
||||
Examples:
|
||||
| role | permissions | http-status-code | dav-path |
|
||||
| manager | all | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| editor | all | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| viewer | all | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| manager | change | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| editor | change | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| viewer | change | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| manager | read | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| editor | read | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| viewer | read | 403 | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| manager | all | 403 | /dav/spaces/<<FILEID>> |
|
||||
| editor | all | 403 | /dav/spaces/<<FILEID>> |
|
||||
| viewer | all | 403 | /dav/spaces/<<FILEID>> |
|
||||
| manager | change | 403 | /dav/spaces/<<FILEID>> |
|
||||
| editor | change | 403 | /dav/spaces/<<FILEID>> |
|
||||
| viewer | change | 403 | /dav/spaces/<<FILEID>> |
|
||||
| manager | read | 403 | /dav/spaces/<<FILEID>> |
|
||||
| editor | read | 403 | /dav/spaces/<<FILEID>> |
|
||||
| viewer | read | 403 | /dav/spaces/<<FILEID>> |
|
||||
|
||||
|
||||
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"
|
||||
@@ -278,26 +635,6 @@ Feature: moving/renaming file using file id
|
||||
| /dav/spaces/<<FILEID>> |
|
||||
|
||||
|
||||
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"
|
||||
When user "Brian" renames a file "Shares/folder/test.txt" into "Shares/folder/sub-folder/renamed.txt" inside space "Shares" using file-id path "<dav-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/<<FILEID>> |
|
||||
| /dav/spaces/<<FILEID>> |
|
||||
|
||||
|
||||
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"
|
||||
@@ -330,96 +667,42 @@ Feature: moving/renaming file using file id
|
||||
| /remote.php/dav/spaces/<<FILEID>> |
|
||||
| /dav/spaces/<<FILEID>> |
|
||||
|
||||
|
||||
Scenario Outline: move a file from project to personal space
|
||||
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "project-space" with the default quota using the Graph API
|
||||
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "textfile.txt"
|
||||
@issue-7617
|
||||
Scenario Outline: move a file to a different name into a sub-folder inside share space (all/change permissions)
|
||||
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"
|
||||
When user "Alice" moves a file "/textfile.txt" into "/" inside space "Personal" using file-id path "<dav-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 "project-space" should contain these files:
|
||||
| textfile.txt |
|
||||
But for user "Alice" folder "/" of the space "Personal" should not contain these files:
|
||||
| textfile.txt |
|
||||
And user "Alice" has shared folder "/folder" with user "Brian" with permissions "<permissions>"
|
||||
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 "201"
|
||||
And for user "Brian" folder "folder/sub-folder" of the space "Shares" should contain these files:
|
||||
| renamed.txt |
|
||||
But for user "Brian" folder "folder" of the space "Shares" should not contain these files:
|
||||
| test.txt |
|
||||
Examples:
|
||||
| dav-path |
|
||||
| /remote.php/dav/spaces/<<FILEID>> |
|
||||
| /dav/spaces/<<FILEID>> |
|
||||
| permissions | dav-path |
|
||||
| all | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| all | /dav/spaces/<<FILEID>> |
|
||||
| change | /remote.php/dav/spaces/<<FILEID>> |
|
||||
| change | /dav/spaces/<<FILEID>> |
|
||||
|
||||
|
||||
Scenario Outline: move a file from personal to project space
|
||||
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "project-space" with the default quota using the Graph API
|
||||
And user "Alice" has uploaded a file inside space "Personal" with content "some data" to "textfile.txt"
|
||||
Scenario Outline: move a file to a different name into a sub-folder inside share space (read permissions)
|
||||
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"
|
||||
When user "Alice" moves a file "/textfile.txt" into "/" inside space "project-space" using file-id path "<dav-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 "Personal" should contain these files:
|
||||
| textfile.txt |
|
||||
But for user "Alice" folder "/" of the space "project-space" should not contain these files:
|
||||
| textfile.txt |
|
||||
Examples:
|
||||
| dav-path |
|
||||
| /remote.php/dav/spaces/<<FILEID>> |
|
||||
| /dav/spaces/<<FILEID>> |
|
||||
|
||||
|
||||
Scenario Outline: move a file to different name from project space to personal space
|
||||
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "project-space" with the default quota using the Graph API
|
||||
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
When user "Alice" renames a file "/textfile.txt" into "/renamed.txt" inside space "Personal" using file-id path "<dav-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 "project-space" should contain these files:
|
||||
| textfile.txt |
|
||||
But for user "Alice" folder "/" of the space "Personal" should not contain these files:
|
||||
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"
|
||||
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:
|
||||
| renamed.txt |
|
||||
Examples:
|
||||
| dav-path |
|
||||
| /remote.php/dav/spaces/<<FILEID>> |
|
||||
| /dav/spaces/<<FILEID>> |
|
||||
|
||||
|
||||
Scenario Outline: move a file to different name from personal space to project space
|
||||
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "project-space" with the default quota using the Graph API
|
||||
And user "Alice" has uploaded a file inside space "Personal" with content "some data" to "textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
When user "Alice" renames a file "/textfile.txt" into "/renamed.txt" inside space "project-space" using file-id path "<dav-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 "Personal" should contain these files:
|
||||
| textfile.txt |
|
||||
But for user "Alice" folder "/" of the space "project-space" should not contain these files:
|
||||
| renamed.txt |
|
||||
Examples:
|
||||
| dav-path |
|
||||
| /remote.php/dav/spaces/<<FILEID>> |
|
||||
| /dav/spaces/<<FILEID>> |
|
||||
|
||||
|
||||
Scenario Outline: move a file to different name 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 "<dav-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/<<FILEID>> |
|
||||
| /dav/spaces/<<FILEID>> |
|
||||
|
||||
@@ -46,7 +46,25 @@ Feature: move (rename) file
|
||||
But for user "Alice" the space "Project" should contain these entries:
|
||||
| insideSpace.txt |
|
||||
|
||||
@issue-1976
|
||||
Scenario Outline: try to move a file within a project space into a folder with same name
|
||||
Given the administrator has assigned the role "Space Admin" to user "Brian" using the Graph API
|
||||
And user "Brian" has created a space "Project" with the default quota using the Graph API
|
||||
And user "Brian" has uploaded a file inside space "Project" with content "some content" to "insideSpace.txt"
|
||||
And user "Brian" has shared a space "Project" with settings:
|
||||
| shareWith | Alice |
|
||||
| role | <role> |
|
||||
When user "Alice" moves file "insideSpace.txt" from space "Project" to "insideSpace.txt" inside space "Project" using the WebDAV API
|
||||
Then the HTTP status code should be "403"
|
||||
And as "Brian" file "insideSpace.txt" should not exist in the trashbin of the space "Project"
|
||||
And for user "Alice" the content of the file "insideSpace.txt" of the space "Project" should be "some content"
|
||||
Examples:
|
||||
| role |
|
||||
| manager |
|
||||
| editor |
|
||||
| viewer |
|
||||
|
||||
@issue-8116
|
||||
Scenario Outline: user moves a file from a space project with different a role to a space project with different role
|
||||
Given the administrator has assigned the role "Space Admin" to user "Brian" using the Graph API
|
||||
And user "Brian" has created a space "Project1" with the default quota using the Graph API
|
||||
@@ -59,24 +77,24 @@ Feature: move (rename) file
|
||||
| shareWith | Alice |
|
||||
| role | <from_role> |
|
||||
When user "Alice" moves file "project1.txt" from space "Project1" to "project1.txt" inside space "Project2" using the WebDAV API
|
||||
Then the HTTP status code should be "<https_status_code>"
|
||||
Then the HTTP status code should be "<http-status-code>"
|
||||
And for user "Alice" the space "Project1" should contain these entries:
|
||||
| project1.txt |
|
||||
And for user "Alice" the space "Project2" should not contain these entries:
|
||||
| project1.txt |
|
||||
Examples:
|
||||
| from_role | to_role | https_status_code |
|
||||
| manager | manager | 502 |
|
||||
| editor | manager | 502 |
|
||||
| manager | editor | 502 |
|
||||
| editor | editor | 502 |
|
||||
| from_role | to_role | http-status-code |
|
||||
| manager | manager | 403 |
|
||||
| editor | manager | 403 |
|
||||
| manager | editor | 403 |
|
||||
| editor | editor | 403 |
|
||||
| manager | viewer | 403 |
|
||||
| editor | viewer | 403 |
|
||||
| viewer | manager | 403 |
|
||||
| viewer | editor | 403 |
|
||||
| viewer | viewer | 403 |
|
||||
|
||||
|
||||
@issue-7618
|
||||
Scenario Outline: user moves a file from a space project with different role to a space personal
|
||||
Given the administrator has assigned the role "Space Admin" to user "Brian" using the Graph API
|
||||
And user "Brian" has created a space "Project" with the default quota using the Graph API
|
||||
@@ -85,15 +103,15 @@ Feature: move (rename) file
|
||||
| shareWith | Alice |
|
||||
| role | <role> |
|
||||
When user "Alice" moves file "project.txt" from space "Project" to "project.txt" inside space "Personal" using the WebDAV API
|
||||
Then the HTTP status code should be "<https_status_code>"
|
||||
Then the HTTP status code should be "<http-status-code>"
|
||||
And for user "Alice" the space "Project" should contain these entries:
|
||||
| project.txt |
|
||||
And for user "Alice" the space "Personal" should not contain these entries:
|
||||
| project.txt |
|
||||
Examples:
|
||||
| role | https_status_code |
|
||||
| manager | 502 |
|
||||
| editor | 502 |
|
||||
| role | http-status-code |
|
||||
| manager | 403 |
|
||||
| editor | 403 |
|
||||
| viewer | 403 |
|
||||
|
||||
|
||||
@@ -107,21 +125,24 @@ 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 "502"
|
||||
Then the HTTP status code should be "403"
|
||||
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:
|
||||
| project.txt |
|
||||
Examples:
|
||||
| role | permissions |
|
||||
| manager | 31 |
|
||||
| editor | 31 |
|
||||
| manager | 17 |
|
||||
| editor | 17 |
|
||||
| viewer | 31 |
|
||||
| viewer | 17 |
|
||||
|
||||
| manager | all |
|
||||
| editor | all |
|
||||
| viewer | all |
|
||||
| manager | change |
|
||||
| editor | change |
|
||||
| viewer | change |
|
||||
| manager | read |
|
||||
| editor | read |
|
||||
| viewer | read |
|
||||
|
||||
@issue-7618
|
||||
Scenario Outline: user moves a file from space personal to space project with different role
|
||||
Given the administrator has assigned the role "Space Admin" to user "Brian" using the Graph API
|
||||
And user "Brian" has created a space "Project" with the default quota using the Graph API
|
||||
@@ -130,15 +151,15 @@ Feature: move (rename) file
|
||||
| role | <role> |
|
||||
And user "Alice" has uploaded file with content "personal space content" to "/personal.txt"
|
||||
When user "Alice" moves file "personal.txt" from space "Personal" to "personal.txt" inside space "Project" using the WebDAV API
|
||||
Then the HTTP status code should be "<https_status_code>"
|
||||
Then the HTTP status code should be "<http-status-code>"
|
||||
And for user "Alice" the space "Personal" should contain these entries:
|
||||
| personal.txt |
|
||||
And for user "Alice" the space "Project" should not contain these entries:
|
||||
| personal.txt |
|
||||
Examples:
|
||||
| role | https_status_code |
|
||||
| manager | 502 |
|
||||
| editor | 502 |
|
||||
| role | http-status-code |
|
||||
| manager | 403 |
|
||||
| editor | 403 |
|
||||
| viewer | 403 |
|
||||
|
||||
|
||||
@@ -147,16 +168,16 @@ 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 "502"
|
||||
Then the HTTP status code should be "403"
|
||||
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:
|
||||
| project.txt |
|
||||
Examples:
|
||||
| permissions |
|
||||
| 31 |
|
||||
| 17 |
|
||||
| 1 |
|
||||
| all |
|
||||
| change |
|
||||
| read |
|
||||
|
||||
|
||||
Scenario Outline: user moves a file from space Shares with different role (permissions) to space personal
|
||||
@@ -164,16 +185,16 @@ 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 "502"
|
||||
Then the HTTP status code should be "403"
|
||||
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:
|
||||
| testshare.txt |
|
||||
Examples:
|
||||
| permissions |
|
||||
| 31 |
|
||||
| 17 |
|
||||
| 1 |
|
||||
| all |
|
||||
| change |
|
||||
| read |
|
||||
|
||||
|
||||
Scenario Outline: user moves a file from space Shares with different role (permissions) to space project with different role
|
||||
@@ -186,71 +207,53 @@ 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 "502"
|
||||
Then the HTTP status code should be "403"
|
||||
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:
|
||||
| testshare.txt |
|
||||
Examples:
|
||||
| role | permissions |
|
||||
| manager | 31 |
|
||||
| editor | 31 |
|
||||
| viewer | 31 |
|
||||
| manager | 17 |
|
||||
| editor | 17 |
|
||||
| viewer | 17 |
|
||||
| manager | all |
|
||||
| editor | all |
|
||||
| viewer | all |
|
||||
| manager | change |
|
||||
| editor | change |
|
||||
| viewer | change |
|
||||
| manager | read |
|
||||
| editor | read |
|
||||
| viewer | read |
|
||||
|
||||
|
||||
Scenario: user moves a file from space Shares with role editor to space Shares with role editor
|
||||
Scenario Outline: user moves a file from space Shares to another space Shares with different role (permissions)
|
||||
Given user "Brian" has created folder "/testshare1"
|
||||
And user "Brian" has created folder "/testshare2"
|
||||
And user "Brian" has uploaded file with content "testshare1 content" to "/testshare1/testshare1.txt"
|
||||
And user "Brian" has shared folder "/testshare1" with user "Alice" with permissions "31"
|
||||
And user "Brian" has shared folder "/testshare2" with user "Alice" with permissions "31"
|
||||
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 "502"
|
||||
Then the HTTP status code should be "403"
|
||||
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:
|
||||
| testshare1.txt |
|
||||
Examples:
|
||||
| from_permissions | to_permissions |
|
||||
| all | all |
|
||||
| all | change |
|
||||
| all | read |
|
||||
| change | all |
|
||||
| change | change |
|
||||
| change | read |
|
||||
| read | all |
|
||||
| read | change |
|
||||
| read | read |
|
||||
|
||||
|
||||
Scenario: user moves a file from space Shares with role editor to space Shares with role viewer
|
||||
Given user "Brian" has created folder "/testshare1"
|
||||
And user "Brian" has created folder "/testshare2"
|
||||
And user "Brian" has uploaded file with content "testshare1 content" to "/testshare1/testshare1.txt"
|
||||
And user "Brian" has shared folder "/testshare1" with user "Alice" with permissions "31"
|
||||
And user "Brian" has shared folder "/testshare2" with user "Alice" with permissions "17"
|
||||
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 "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:
|
||||
| testshare1.txt |
|
||||
|
||||
|
||||
Scenario: user moves a file from space Shares with role viewer to space Shares with role editor
|
||||
Given user "Brian" has created folder "/testshare1"
|
||||
And user "Brian" has created folder "/testshare2"
|
||||
And user "Brian" has uploaded file with content "testshare1 content" to "/testshare1/testshare1.txt"
|
||||
And user "Brian" has shared folder "/testshare1" with user "Alice" with permissions "17"
|
||||
And user "Brian" has shared folder "/testshare2" with user "Alice" with permissions "31"
|
||||
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 "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:
|
||||
| testshare1.txt |
|
||||
|
||||
|
||||
Scenario: moving a file out of a shared folder as a sharer
|
||||
Scenario Outline: moving a file out of a shared folder as a sharer
|
||||
Given user "Brian" has created folder "/testshare"
|
||||
And user "Brian" has uploaded file with content "test data" to "/testshare/testfile.txt"
|
||||
And user "Brian" has created a share with settings
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| permissions | change |
|
||||
| shareWith | Alice |
|
||||
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
|
||||
When user "Brian" moves file "/testshare/testfile.txt" from space "Personal" to "/testfile.txt" inside space "Personal" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And the content of file "/testfile.txt" for user "Brian" should be "test data"
|
||||
@@ -258,19 +261,20 @@ Feature: move (rename) file
|
||||
| testfile.txt |
|
||||
And for user "Brian" folder "testshare" of the space "Personal" should not contain these entries:
|
||||
| testfile.txt |
|
||||
Examples:
|
||||
| permissions |
|
||||
| all |
|
||||
| change |
|
||||
| read |
|
||||
|
||||
|
||||
Scenario: moving a folder out of a shared folder as a sharer
|
||||
Scenario Outline: moving a folder out of a shared folder as a sharer
|
||||
Given user "Brian" has created the following folders
|
||||
| path |
|
||||
| /testshare |
|
||||
| /testshare/testsubfolder |
|
||||
And user "Brian" has uploaded file with content "test data" to "/testshare/testsubfolder/testfile.txt"
|
||||
And user "Brian" has created a share with settings
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| permissions | change |
|
||||
| shareWith | Alice |
|
||||
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
|
||||
When user "Brian" moves folder "/testshare/testsubfolder" from space "Personal" to "/testsubfolder" inside space "Personal" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And the content of file "/testsubfolder/testfile.txt" for user "Brian" should be "test data"
|
||||
@@ -278,19 +282,73 @@ Feature: move (rename) file
|
||||
| testsubfolder |
|
||||
And for user "Brian" folder "testshare" of the space "Personal" should not contain these entries:
|
||||
| testsubfolder |
|
||||
Examples:
|
||||
| permissions |
|
||||
| all |
|
||||
| change |
|
||||
| read |
|
||||
|
||||
|
||||
Scenario: overwriting a file while moving
|
||||
Given user "Brian" has created folder "/folder"
|
||||
And user "Brian" has uploaded file with content "some content" to "/folder/testfile.txt"
|
||||
And user "Brian" has uploaded file with content "old data version 1" to "/testfile.txt"
|
||||
And user "Brian" has uploaded file with content "new data version 2" to "/testfile.txt"
|
||||
When user "Brian" overwrites file "/testfile.txt" from space "Personal" to "folder/testfile.txt" inside space "Personal" while moving using the WebDAV API
|
||||
Scenario Outline: sharee moves a file within a Shares space (all/change permissions)
|
||||
Given user "Brian" has created folder "testshare"
|
||||
Given user "Brian" has created folder "testshare/child"
|
||||
And user "Brian" has uploaded file with content "test file content" to "/testshare/testfile.txt"
|
||||
And user "Brian" has shared folder "testshare" with user "Alice" with permissions "<permissions>"
|
||||
When user "Alice" moves file "testshare/testfile.txt" from space "Shares" to "testshare/child/testfile.txt" inside space "Shares" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And for user "Alice" the content of the file "testshare/child/testfile.txt" of the space "Shares" should be "test file content"
|
||||
And for user "Alice" folder "testshare" of the space "Shares" should not contain these entries:
|
||||
| testfile.txt |
|
||||
Examples:
|
||||
| permissions |
|
||||
| all |
|
||||
| change |
|
||||
|
||||
|
||||
Scenario: sharee moves a file within a Shares space (read permissions)
|
||||
Given user "Brian" has created folder "testshare"
|
||||
Given user "Brian" has created folder "testshare/child"
|
||||
And user "Brian" has uploaded file with content "test file content" to "/testshare/testfile.txt"
|
||||
And user "Brian" has shared folder "testshare" with user "Alice" with permissions "read"
|
||||
When user "Alice" moves file "testshare/testfile.txt" from space "Shares" to "testshare/child/testfile.txt" inside space "Shares" using the WebDAV API
|
||||
Then the HTTP status code should be "403"
|
||||
And for user "Alice" folder "testshare/child" of the space "Shares" should not contain these entries:
|
||||
| testfile.txt |
|
||||
But for user "Alice" folder "testshare" of the space "Shares" should contain these entries:
|
||||
| testfile.txt |
|
||||
|
||||
@issue-1976
|
||||
Scenario Outline: sharee tries to move a file into same shared folder with same name
|
||||
Given user "Brian" has created folder "testshare"
|
||||
And user "Brian" has uploaded file with content "test file content" to "testshare/testfile.txt"
|
||||
And user "Brian" has shared folder "testshare" with user "Alice" with permissions "<permissions>"
|
||||
When user "Alice" moves file "testshare/testfile.txt" from space "Shares" to "testshare/testfile.txt" inside space "Shares" using the WebDAV API
|
||||
Then the HTTP status code should be "403"
|
||||
And as "Brian" file "testfile.txt" should not exist in the trashbin of the space "Personal"
|
||||
And for user "Alice" the content of the file "testshare/testfile.txt" of the space "Shares" should be "test file content"
|
||||
And for user "Brian" the content of the file "testshare/testfile.txt" of the space "Personal" should be "test file content"
|
||||
Examples:
|
||||
| permissions |
|
||||
| all |
|
||||
| change |
|
||||
| read |
|
||||
|
||||
|
||||
Scenario: overwrite a file while moving in project space
|
||||
Given the administrator has assigned the role "Space Admin" to user "Brian" using the Graph API
|
||||
And user "Brian" has created a space "Project" with the default quota using the Graph API
|
||||
And user "Brian" has created a folder "folder" in space "Project"
|
||||
And user "Brian" has uploaded a file inside space "Project" with content "root file v1" to "testfile.txt"
|
||||
And user "Brian" has uploaded a file inside space "Project" with content "root file v2" to "testfile.txt"
|
||||
And user "Brian" has uploaded a file inside space "Project" with content "same name file" to "folder/testfile.txt"
|
||||
And user "Brian" has shared a space "Project" with settings:
|
||||
| shareWith | Alice |
|
||||
| role | editor |
|
||||
When user "Alice" overwrites file "testfile.txt" from space "Project" to "folder/testfile.txt" inside space "Project" while moving using the WebDAV API
|
||||
Then the HTTP status code should be "204"
|
||||
And the content of file "/folder/testfile.txt" for user "Brian" should be "new data version 2"
|
||||
And for user "Brian" the space "Personal" should not contain these entries:
|
||||
| /testfile.txt |
|
||||
When user "Brian" downloads version of the file "/folder/testfile.txt" with the index "1" of the space "Personal" using the WebDAV API
|
||||
And for user "Alice" the content of the file "folder/testfile.txt" of the space "Project" should be "root file v2"
|
||||
And for user "Alice" the space "Project" should not contain these entries:
|
||||
| testfile.txt |
|
||||
When user "Brian" downloads version of the file "folder/testfile.txt" with the index "1" of the space "Project" using the WebDAV API
|
||||
Then the HTTP status code should be "200"
|
||||
And the downloaded content should be "old data version 1"
|
||||
And as "Brian" file "testfile.txt" should exist in the trashbin of the space "Personal"
|
||||
And the downloaded content should be "root file v1"
|
||||
@@ -118,7 +118,7 @@ class FilesVersionsContext implements Context {
|
||||
$endpoint,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
"versions",
|
||||
(string)$this->featureContext->getDavPathVersion()
|
||||
)
|
||||
);
|
||||
@@ -215,6 +215,29 @@ class FilesVersionsContext implements Context {
|
||||
$this->featureContext->setResponse($response, $user);
|
||||
}
|
||||
|
||||
/**
|
||||
* assert file versions count
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $fileId
|
||||
* @param int $expectedCount
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function assertFileVersionsCount(string $user, string $fileId, int $expectedCount):void {
|
||||
$responseXml = $this->listVersionFolder($user, $fileId, 1);
|
||||
$actualCount = \count($responseXml->xpath("//d:prop/d:getetag")) - 1;
|
||||
if ($actualCount === -1) {
|
||||
$actualCount = 0;
|
||||
}
|
||||
Assert::assertEquals(
|
||||
$expectedCount,
|
||||
$actualCount,
|
||||
"Expected $expectedCount versions but found $actualCount in \n" . $responseXml->asXML()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the version folder of file :path for user :user should contain :count element(s)
|
||||
*
|
||||
@@ -232,8 +255,8 @@ class FilesVersionsContext implements Context {
|
||||
):void {
|
||||
$user = $this->featureContext->getActualUsername($user);
|
||||
$fileId = $this->featureContext->getFileIdForPath($user, $path);
|
||||
Assert::assertNotNull($fileId, __METHOD__ . " file $path user $user not found (the file may not exist)");
|
||||
$this->theVersionFolderOfFileIdShouldContainElements($fileId, $user, $count);
|
||||
Assert::assertNotNull($fileId, __METHOD__ . " file '$path' for user '$user' not found (the file may not exist)");
|
||||
$this->assertFileVersionsCount($user, $fileId, $count);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -251,13 +274,7 @@ class FilesVersionsContext implements Context {
|
||||
string $user,
|
||||
int $count
|
||||
):void {
|
||||
$responseXml = $this->listVersionFolder($user, $fileId, 1);
|
||||
$xmlPart = $responseXml->xpath("//d:prop/d:getetag");
|
||||
Assert::assertEquals(
|
||||
$count,
|
||||
\count($xmlPart) - 1,
|
||||
"could not find $count version element(s) in \n" . $responseXml->asXML()
|
||||
);
|
||||
$this->assertFileVersionsCount($user, $fileId, $count);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -322,7 +322,7 @@ class SharingNgContext implements Context {
|
||||
throw new Error('Password is missing to set for share link!');
|
||||
}
|
||||
|
||||
$response = GraphHelper::setPassword(
|
||||
$response = GraphHelper::setLinkSharePassword(
|
||||
$this->featureContext->getBaseUrl(),
|
||||
$this->featureContext->getStepLineRef(),
|
||||
$user,
|
||||
|
||||
@@ -1980,16 +1980,19 @@ class SpacesContext implements Context {
|
||||
*/
|
||||
public function userCopiesOrMovesFileWithFileIdFromAndToSpaceBetweenSpaces(string $user, string $actionType, string $sourceFile, string $destinationFile, string $toSpaceName, string $url): void {
|
||||
// split the source when there are sub-folders
|
||||
$sourceFile = explode("/", $sourceFile);
|
||||
$sourceFile = \trim($sourceFile, "/");
|
||||
$sourceFile = \explode("/", $sourceFile);
|
||||
$sourceFile = \end($sourceFile);
|
||||
$destinationFile = \trim($destinationFile, "/");
|
||||
$fileDestination = '';
|
||||
if ($actionType === 'copies' || $actionType === 'moves') {
|
||||
$fileDestination = $this->escapePath(\ltrim($destinationFile, "/")) . '/' . $this->escapePath(\ltrim(end($sourceFile), "/"));
|
||||
$fileDestination = $this->escapePath($destinationFile) . '/' . $this->escapePath($sourceFile);
|
||||
} elseif ($actionType === 'renames') {
|
||||
$fileDestination = $destinationFile;
|
||||
}
|
||||
$baseUrl = $this->featureContext->getBaseUrl();
|
||||
if ($toSpaceName === 'Shares') {
|
||||
$sharesPath = $this->featureContext->getMountSharesPath($user, $fileDestination);
|
||||
$sharesPath = $this->featureContext->getSharesMountPath($user, $fileDestination);
|
||||
$davPath = WebDavHelper::getDavPath($user, $this->featureContext->getDavPathVersion());
|
||||
$headers['Destination'] = $baseUrl . $davPath . $sharesPath;
|
||||
} else {
|
||||
|
||||
@@ -4946,29 +4946,27 @@ trait WebDav {
|
||||
* @return string
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function getMountSharesPath(
|
||||
public function getSharesMountPath(
|
||||
string $user,
|
||||
string $path
|
||||
): string {
|
||||
$user = $this->getActualUsername($user);
|
||||
$path = trim($path, "/");
|
||||
$pathArray = explode("/", $path);
|
||||
$sharedFolder = $pathArray[0] === "Shares" ? $pathArray[1] : $pathArray[0];
|
||||
|
||||
$shareMountId = GraphHelper::getShareMountId(
|
||||
$this->getBaseUrl(),
|
||||
$this->getStepLineRef(),
|
||||
$user,
|
||||
$this->getPasswordForUser($user),
|
||||
$pathArray[1]
|
||||
$sharedFolder
|
||||
);
|
||||
|
||||
if (\count($pathArray) > 2) {
|
||||
$pathArray = \array_slice($pathArray, 2);
|
||||
$path = '/' . implode("/", array_map("strval", $pathArray));
|
||||
} else {
|
||||
$path = null;
|
||||
}
|
||||
return $shareMountId . $path;
|
||||
$path = \array_slice($pathArray, array_search($sharedFolder, $pathArray) + 1);
|
||||
$path = \implode("/", $path);
|
||||
|
||||
return "$shareMountId/$path";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4997,7 +4995,7 @@ trait WebDav {
|
||||
} else {
|
||||
$urlParameter = null;
|
||||
}
|
||||
$sharesPath = $this->getMountSharesPath($user, $path) . '/?' . $urlParameter;
|
||||
$sharesPath = $this->getSharesMountPath($user, $path) . '/?' . $urlParameter;
|
||||
|
||||
$davPath = WebDavHelper::getDavPath($user, $this->getDavPathVersion());
|
||||
$fullUrl = $this->getBaseUrl() . $davPath . $sharesPath;
|
||||
@@ -5024,7 +5022,7 @@ trait WebDav {
|
||||
string $destination,
|
||||
?string $content = null
|
||||
): ResponseInterface {
|
||||
$sharesPath = $this->getMountSharesPath($user, $destination);
|
||||
$sharesPath = $this->getSharesMountPath($user, $destination);
|
||||
|
||||
$davPath = WebDavHelper::getDavPath($user, $this->getDavPathVersion());
|
||||
$fullUrl = $this->getBaseUrl() . $davPath . $sharesPath;
|
||||
|
||||
+1
-1
@@ -460,7 +460,7 @@ Feature: share resources where the sharee receives the share in multiple ways
|
||||
And as "Brian" file "Shares/sharedParent/child/lorem.txt" should exist
|
||||
|
||||
@issue-7555
|
||||
Scenario Outline: share receiver renames a group share and receives same resource through user share with additional permissions
|
||||
Scenario Outline: share receiver renames a group share and receives same resource through user share with additional permissions
|
||||
Given using OCS API version "<ocs_api_version>"
|
||||
And group "grp" has been created
|
||||
And user "Brian" has been added to group "grp"
|
||||
|
||||
+5
-5
@@ -470,7 +470,7 @@ Feature: sharing
|
||||
| 1 | 100 |
|
||||
| 2 | 200 |
|
||||
|
||||
@issue-2146 @issue-764 @issue-7555
|
||||
@issue-764 @issue-7555
|
||||
Scenario: share a file by multiple channels and download from sub-folder and direct file share
|
||||
Given these users have been created with default attributes and without skeleton files:
|
||||
| username |
|
||||
@@ -481,11 +481,11 @@ Feature: sharing
|
||||
And user "Carol" has been added to group "grp1"
|
||||
And user "Alice" has created folder "/common"
|
||||
And user "Alice" has created folder "/common/sub"
|
||||
And user "Alice" has uploaded file with content "ownCloud" to "/textfile0.txt"
|
||||
And user "Alice" has shared folder "common" with group "grp1"
|
||||
And user "Brian" has uploaded file with content "ownCloud" to "/textfile0.txt"
|
||||
And user "Brian" has shared file "textfile0.txt" with user "Carol"
|
||||
And user "Brian" has moved file "/textfile0.txt" to "/Shares/common/textfile0.txt"
|
||||
And user "Brian" has moved file "/Shares/common/textfile0.txt" to "/Shares/common/sub/textfile0.txt"
|
||||
And user "Alice" has shared file "textfile0.txt" with user "Carol"
|
||||
And user "Alice" has moved file "/textfile0.txt" to "/common/textfile0.txt"
|
||||
And user "Alice" has moved file "/common/textfile0.txt" to "/common/sub/textfile0.txt"
|
||||
When user "Carol" uploads file "filesForUpload/file_to_overwrite.txt" to "/Shares/textfile0.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "204"
|
||||
And the content of file "/Shares/common/sub/textfile0.txt" for user "Carol" should be "BLABLABLA" plus end-of-line
|
||||
|
||||
+4
-7
@@ -43,13 +43,10 @@ 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 "201"
|
||||
And as "Alice" folder "/folderA/localFolder" should exist
|
||||
And as "Brian" folder "/Shares/folderA/localFolder" should exist
|
||||
And as "Alice" folder "/folderA/localFolder/subFolder" should exist
|
||||
And as "Brian" folder "/Shares/folderA/localFolder/subFolder" should exist
|
||||
And as "Alice" file "/folderA/localFolder/localFile.txt" should exist
|
||||
And as "Brian" file "/Shares/folderA/localFolder/localFile.txt" should exist
|
||||
Then the HTTP status code should be "403"
|
||||
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
|
||||
|
||||
|
||||
Scenario: share receiver tries to move a whole share inside a local folder
|
||||
|
||||
+1
-56
@@ -10,21 +10,6 @@ Feature: sharing
|
||||
| Alice |
|
||||
| Brian |
|
||||
|
||||
@smokeTest
|
||||
Scenario Outline: moving a file into a share as recipient
|
||||
Given using <dav-path-version> DAV path
|
||||
And user "Alice" has created folder "/shared"
|
||||
And user "Alice" has shared folder "/shared" with user "Brian"
|
||||
And user "Brian" has uploaded file with content "some data" to "/textfile0.txt"
|
||||
When user "Brian" moves file "textfile0.txt" to "/Shares/shared/shared_file.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And as "Brian" file "/Shares/shared/shared_file.txt" should exist
|
||||
And as "Alice" file "/shared/shared_file.txt" should exist
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
| new |
|
||||
|
||||
|
||||
Scenario Outline: move files between shares by same user
|
||||
Given using <dav-path-version> DAV path
|
||||
@@ -35,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 "502"
|
||||
Then the HTTP status code should be "403"
|
||||
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
|
||||
@@ -46,46 +31,6 @@ Feature: sharing
|
||||
| new |
|
||||
|
||||
|
||||
Scenario Outline: move files between shares by same user added by sharee
|
||||
Given using <dav-path-version> DAV path
|
||||
And user "Alice" has created folder "share1"
|
||||
And user "Alice" has created folder "share2"
|
||||
And user "Brian" has uploaded file with content "some data" to "/textfile0.txt"
|
||||
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 "textfile0.txt" to "/Shares/share1/shared_file.txt" using the WebDAV API
|
||||
And user "Brian" moves file "/Shares/share1/shared_file.txt" to "/Shares/share2/shared_file.txt" using the WebDAV API
|
||||
Then the HTTP status code of responses on all endpoints should be "201"
|
||||
And as "Brian" file "/Shares/share1/shared_file.txt" should not exist
|
||||
And as "Alice" file "share1/shared_file.txt" should not exist
|
||||
But as "Brian" file "/Shares/share2/shared_file.txt" should exist
|
||||
And as "Alice" file "share2/shared_file.txt" should exist
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
| new |
|
||||
|
||||
|
||||
Scenario Outline: move files between shares by different users
|
||||
Given using <dav-path-version> DAV path
|
||||
And user "Carol" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
|
||||
And user "Alice" has created folder "/PARENT"
|
||||
And user "Brian" has created folder "/PARENT"
|
||||
And user "Alice" has moved file "textfile0.txt" to "PARENT/shared_file.txt"
|
||||
And user "Alice" has shared folder "/PARENT" with user "Carol"
|
||||
And user "Brian" has shared folder "/PARENT" with user "Carol"
|
||||
When user "Carol" moves file "/Shares/PARENT/shared_file.txt" to "/Shares/PARENT (2)/shared_file.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And as "Carol" file "/Shares/PARENT (2)/shared_file.txt" should exist
|
||||
And as "Brian" file "PARENT/shared_file.txt" should exist
|
||||
But as "Alice" file "PARENT/shared_file.txt" should not exist
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
| new |
|
||||
|
||||
|
||||
Scenario Outline: overwrite a received file share
|
||||
Given using <dav-path-version> DAV path
|
||||
And user "Alice" has uploaded file with content "this is the old content" to "/textfile1.txt"
|
||||
|
||||
@@ -359,50 +359,33 @@ Feature: dav-versions
|
||||
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Carol" should be "First content"
|
||||
|
||||
@skipOnReva
|
||||
Scenario: moving a file (with versions) into a shared folder as the sharee and as the sharer
|
||||
Given using new DAV path
|
||||
Scenario Outline: moving a file (with versions) into a shared folder as the sharer
|
||||
Given using <dav-path-version> DAV path
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Brian" has created folder "/testshare"
|
||||
And user "Brian" has created a share with settings
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| permissions | change |
|
||||
| shareWith | Alice |
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| permissions | <permissions> |
|
||||
| shareWith | Alice |
|
||||
And user "Brian" has uploaded file with content "test data 1" to "/testfile.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Brian" has uploaded file with content "test data 2" to "/testfile.txt"
|
||||
And user "Brian" has uploaded file with content "test data 3" to "/testfile.txt"
|
||||
When user "Brian" moves file "/testfile.txt" to "/testshare/testfile.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And as "Brian" file "/testfile.txt" should not exist
|
||||
And the content of file "/Shares/testshare/testfile.txt" for user "Alice" should be "test data 3"
|
||||
And the content of file "/testshare/testfile.txt" for user "Brian" should be "test data 3"
|
||||
And as "Brian" file "/testfile.txt" should not exist
|
||||
When user "Alice" tries to get the number of versions of file "/Shares/testshare/testfile.txt" using file-id path "/meta/<<FILEID>>/v"
|
||||
Then the HTTP status code should be "403"
|
||||
|
||||
|
||||
Scenario Outline: moving a file (with versions) out of a shared folder as the sharee and as the sharer
|
||||
Given using <dav-path-version> DAV path
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Brian" has created folder "/testshare"
|
||||
And user "Brian" has uploaded file with content "test data 1" to "/testshare/testfile.txt"
|
||||
And user "Brian" has uploaded file with content "test data 2" to "/testshare/testfile.txt"
|
||||
And user "Brian" has uploaded file with content "test data 3" to "/testshare/testfile.txt"
|
||||
And user "Brian" has created a share with settings
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| permissions | change |
|
||||
| shareWith | Alice |
|
||||
When user "Brian" moves file "/testshare/testfile.txt" to "/testfile.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And the content of file "/testfile.txt" for user "Brian" should be "test data 3"
|
||||
And as "Alice" file "/Shares/testshare/testfile.txt" should not exist
|
||||
And as "Brian" file "/testshare/testfile.txt" should not exist
|
||||
And the version folder of file "/testfile.txt" for user "Brian" should contain "2" elements
|
||||
And the version folder of file "Shares/testshare/testfile.txt" for user "Alice" should contain "0" elements
|
||||
And the version folder of file "testshare/testfile.txt" for user "Brian" should contain "2" elements
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
| new |
|
||||
| dav-path-version | permissions |
|
||||
| old | read |
|
||||
| old | change |
|
||||
| old | all |
|
||||
| new | read |
|
||||
| new | change |
|
||||
| new | all |
|
||||
|
||||
|
||||
Scenario: sharee tries to get file versions of file not shared by the sharer
|
||||
|
||||
@@ -30,13 +30,16 @@ Feature: move (rename) file
|
||||
@smokeTest
|
||||
Scenario Outline: moving and overwriting a file
|
||||
Given using <dav-path-version> DAV path
|
||||
And user "Alice" has uploaded file with content "ownCloud test text file 0" to "textfile0.txt"
|
||||
And user "Alice" has uploaded file with content "ownCloud test text file 0 v1" to "textfile0.txt"
|
||||
And user "Alice" has uploaded file with content "ownCloud test text file 0 v2" to "textfile0.txt"
|
||||
And user "Alice" has uploaded file with content "ownCloud test text file 1" to "textfile1.txt"
|
||||
When user "Alice" moves file "/textfile0.txt" to "/textfile1.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "204"
|
||||
And the following headers should match these regular expressions for user "Alice"
|
||||
| ETag | /^"[a-f0-9:\.]{1,32}"$/ |
|
||||
And the content of file "/textfile1.txt" for user "Alice" should be "ownCloud test text file 0"
|
||||
And the content of file "/textfile1.txt" for user "Alice" should be "ownCloud test text file 0 v2"
|
||||
And the content of version index "1" of file "/textfile1.txt" for user "Alice" should be "ownCloud test text file 0 v1"
|
||||
And as "Alice" file "/textfile0.txt" should not exist
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
@@ -104,6 +107,24 @@ Feature: move (rename) file
|
||||
| dav-path-version |
|
||||
| spaces |
|
||||
|
||||
@issue-1976
|
||||
Scenario Outline: try to move a file into same folder with same name
|
||||
Given using <dav-path-version> DAV path
|
||||
And user "Alice" has uploaded file with content "ownCloud test text file" to "testfile.txt"
|
||||
When user "Alice" moves file "testfile.txt" to "testfile.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "403"
|
||||
And as "Alice" the file with original path "testfile.txt" should not exist in the trashbin
|
||||
And the content of file "testfile.txt" for user "Alice" should be "ownCloud test text file"
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
| new |
|
||||
|
||||
@skipOnRevaMaster
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| spaces |
|
||||
|
||||
|
||||
Scenario Outline: move file into a not-existing folder
|
||||
Given using <dav-path-version> DAV path
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@skipOnReva
|
||||
Feature: move (rename) file
|
||||
As a user
|
||||
I want to be able to move and rename files
|
||||
@@ -7,93 +8,156 @@ Feature: move (rename) file
|
||||
Given using OCS API version "1"
|
||||
And user "Alice" has been created with default attributes and without skeleton files
|
||||
|
||||
@skipOnReva
|
||||
Scenario Outline: moving a file into a shared folder as the sharee and as the sharer
|
||||
|
||||
Scenario Outline: sharer moves a file into a shared folder
|
||||
Given using <dav-path-version> DAV path
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Brian" has created folder "/testshare"
|
||||
And user "Brian" has created a share with settings
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| permissions | change |
|
||||
| shareWith | Alice |
|
||||
And user "<mover>" has uploaded file with content "test data" to "/testfile.txt"
|
||||
When user "<mover>" moves file "/testfile.txt" to "<destination_folder>/testfile.txt" using the WebDAV API
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| permissions | <permissions> |
|
||||
| shareWith | Alice |
|
||||
And user "Brian" has uploaded file with content "test data" to "/testfile.txt"
|
||||
When user "Brian" moves file "/testfile.txt" to "testshare/testfile.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And the content of file "/Shares/testshare/testfile.txt" for user "Alice" should be "test data"
|
||||
And the content of file "/testshare/testfile.txt" for user "Brian" should be "test data"
|
||||
And as "<mover>" file "/testfile.txt" should not exist
|
||||
And as "Brian" file "/testfile.txt" should not exist
|
||||
Examples:
|
||||
| dav-path-version | mover | destination_folder |
|
||||
| old | Alice | /Shares/testshare |
|
||||
| old | Brian | /testshare |
|
||||
| new | Alice | /Shares/testshare |
|
||||
| new | Brian | /testshare |
|
||||
| dav-path-version | permissions |
|
||||
| old | read |
|
||||
| old | change |
|
||||
| old | all |
|
||||
| new | read |
|
||||
| new | change |
|
||||
| new | all |
|
||||
|
||||
|
||||
Scenario Outline: sharee tries to move a file into a shared folder
|
||||
Given using <dav-path-version> DAV path
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Brian" has created folder "/testshare"
|
||||
And user "Brian" has created a share with settings
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| permissions | <permissions> |
|
||||
| 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"
|
||||
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
|
||||
Examples:
|
||||
| dav-path-version | permissions |
|
||||
| old | read |
|
||||
| old | change |
|
||||
| old | all |
|
||||
| new | read |
|
||||
| new | change |
|
||||
| new | all |
|
||||
|
||||
|
||||
@skipOnReva
|
||||
Scenario Outline: moving a file out of a shared folder as the sharer
|
||||
Given using <dav-path-version> DAV path
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Brian" has created folder "/testshare"
|
||||
And user "Brian" has uploaded file with content "test data" to "/testshare/testfile.txt"
|
||||
And user "Brian" has created a share with settings
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| permissions | change |
|
||||
| shareWith | Alice |
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| permissions | <permissions> |
|
||||
| shareWith | Alice |
|
||||
When user "Brian" moves file "/testshare/testfile.txt" to "/testfile.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And the content of file "/testfile.txt" for user "Brian" should be "test data"
|
||||
And as "Alice" file "/Shares/testshare/testfile.txt" should not exist
|
||||
And as "Brian" file "/testshare/testfile.txt" should not exist
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
| new |
|
||||
| dav-path-version | permissions |
|
||||
| old | read |
|
||||
| old | change |
|
||||
| old | all |
|
||||
| new | read |
|
||||
| new | change |
|
||||
| new | all |
|
||||
|
||||
|
||||
@skipOnReva
|
||||
Scenario Outline: moving a file out of a shared folder as the sharee
|
||||
Given using <dav-path-version> DAV path
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Brian" has created folder "/testshare"
|
||||
And user "Brian" has uploaded file with content "test data" to "/testshare/testfile.txt"
|
||||
And user "Brian" has created a share with settings
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| permissions | change |
|
||||
| shareWith | Alice |
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| 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 "502"
|
||||
Then the HTTP status code should be "403"
|
||||
And as "Alice" file "/Shares/testshare/testfile.txt" should exist
|
||||
And as "Brian" file "/testshare/testfile.txt" should exist
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
| new |
|
||||
| dav-path-version | permissions |
|
||||
| old | read |
|
||||
| old | change |
|
||||
| old | all |
|
||||
| new | read |
|
||||
| new | change |
|
||||
| new | all |
|
||||
|
||||
@skipOnReva
|
||||
Scenario Outline: moving a folder into a shared folder as the sharee and as the sharer
|
||||
|
||||
Scenario Outline: moving a folder into a shared folder the sharer
|
||||
Given using <dav-path-version> DAV path
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Brian" has created folder "/testshare"
|
||||
And user "Brian" has created a share with settings
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| permissions | change |
|
||||
| shareWith | Alice |
|
||||
And user "<mover>" has created folder "/testsubfolder"
|
||||
And user "<mover>" has uploaded file with content "test data" to "/testsubfolder/testfile.txt"
|
||||
When user "<mover>" moves folder "/testsubfolder" to "<destination_folder>/testsubfolder" using the WebDAV API
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| permissions | <permissions> |
|
||||
| shareWith | Alice |
|
||||
And user "Brian" has created folder "/testsubfolder"
|
||||
And user "Brian" has uploaded file with content "test data" to "/testsubfolder/testfile.txt"
|
||||
When user "Brian" moves folder "/testsubfolder" to "testshare/testsubfolder" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And the content of file "/Shares/testshare/testsubfolder/testfile.txt" for user "Alice" should be "test data"
|
||||
And the content of file "/testshare/testsubfolder/testfile.txt" for user "Brian" should be "test data"
|
||||
And as "<mover>" file "/testsubfolder" should not exist
|
||||
And as "Brian" file "/testsubfolder" should not exist
|
||||
Examples:
|
||||
| dav-path-version | mover | destination_folder |
|
||||
| old | Alice | /Shares/testshare |
|
||||
| old | Brian | /testshare |
|
||||
| new | Alice | /Shares/testshare |
|
||||
| new | Brian | /testshare |
|
||||
| dav-path-version | permissions |
|
||||
| old | read |
|
||||
| old | change |
|
||||
| old | all |
|
||||
| new | read |
|
||||
| new | change |
|
||||
| new | all |
|
||||
|
||||
|
||||
Scenario Outline: moving a folder into a shared folder as the sharee
|
||||
Given using <dav-path-version> DAV path
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Brian" has created folder "/testshare"
|
||||
And user "Brian" has created a share with settings
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| permissions | <permissions> |
|
||||
| shareWith | Alice |
|
||||
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"
|
||||
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
|
||||
Examples:
|
||||
| dav-path-version | permissions |
|
||||
| old | read |
|
||||
| old | change |
|
||||
| old | all |
|
||||
| new | read |
|
||||
| new | change |
|
||||
| new | all |
|
||||
|
||||
|
||||
Scenario Outline: moving a folder out of a shared folder as the sharer
|
||||
@@ -105,21 +169,25 @@ Feature: move (rename) file
|
||||
| /testshare/testsubfolder |
|
||||
And user "Brian" has uploaded file with content "test data" to "/testshare/testsubfolder/testfile.txt"
|
||||
And user "Brian" has created a share with settings
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| permissions | change |
|
||||
| shareWith | Alice |
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| permissions | <permissions> |
|
||||
| shareWith | Alice |
|
||||
When user "Brian" moves folder "/testshare/testsubfolder" to "/testsubfolder" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And the content of file "/testsubfolder/testfile.txt" for user "Brian" should be "test data"
|
||||
And as "Alice" folder "/testshare/testsubfolder" should not exist
|
||||
And as "Brian" folder "/testshare/testsubfolder" should not exist
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
| new |
|
||||
| dav-path-version | permissions |
|
||||
| old | read |
|
||||
| old | change |
|
||||
| old | all |
|
||||
| new | read |
|
||||
| new | change |
|
||||
| new | all |
|
||||
|
||||
|
||||
@skipOnReva
|
||||
Scenario Outline: moving a folder out of a shared folder as the sharee
|
||||
Given using <dav-path-version> DAV path
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
@@ -129,55 +197,92 @@ Feature: move (rename) file
|
||||
| /testshare/testsubfolder |
|
||||
And user "Brian" has uploaded file with content "test data" to "/testshare/testsubfolder/testfile.txt"
|
||||
And user "Brian" has created a share with settings
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| permissions | change |
|
||||
| shareWith | Alice |
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| 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 "502"
|
||||
Then the HTTP status code should be "403"
|
||||
And as "Alice" folder "/Shares/testshare/testsubfolder" should exist
|
||||
And as "Brian" folder "/testshare/testsubfolder" should exist
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
| new |
|
||||
| dav-path-version | permissions |
|
||||
| old | read |
|
||||
| old | change |
|
||||
| old | all |
|
||||
| new | read |
|
||||
| new | change |
|
||||
| new | all |
|
||||
|
||||
@skipOnReva
|
||||
Scenario Outline: moving a file to a shared folder with no permissions
|
||||
|
||||
Scenario Outline: sharee moves a file within a shared folder (change/all permissions)
|
||||
Given using <dav-path-version> DAV path
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "textfile0.txt"
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Brian" has created folder "/testshare"
|
||||
And user "Brian" has created folder "testshare"
|
||||
And user "Brian" has created folder "testshare/child"
|
||||
And user "Brian" has uploaded file with content "test data" to "testshare/testfile.txt"
|
||||
And user "Brian" has created a share with settings
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| permissions | read |
|
||||
| shareWith | Alice |
|
||||
When user "Alice" moves file "/textfile0.txt" to "/Shares/testshare/textfile0.txt" using the WebDAV API
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| permissions | <permissions> |
|
||||
| shareWith | Alice |
|
||||
When user "Alice" moves folder "Shares/testshare/testfile.txt" to "Shares/testshare/child/testfile.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And as "Alice" file "/Shares/testshare/child/testfile.txt" should exist
|
||||
And as "Brian" file "/testshare/child/testfile.txt" should exist
|
||||
And as "Alice" file "/Shares/testshare/testfile.txt" should not exist
|
||||
And as "Brian" file "/testshare/testfile.txt" should not exist
|
||||
Examples:
|
||||
| dav-path-version | permissions |
|
||||
| old | change |
|
||||
| old | all |
|
||||
| new | change |
|
||||
| new | all |
|
||||
|
||||
|
||||
Scenario Outline: sharee tries to move a file within a shared folder (read permissions)
|
||||
Given using <dav-path-version> DAV path
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Brian" has created folder "testshare"
|
||||
And user "Brian" has created folder "testshare/child"
|
||||
And user "Brian" has uploaded file with content "test data" to "testshare/testfile.txt"
|
||||
And user "Brian" has created a share with settings
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| permissions | read |
|
||||
| shareWith | Alice |
|
||||
When user "Alice" moves folder "Shares/testshare/testfile.txt" to "Shares/testshare/child/testfile.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "403"
|
||||
And user "Alice" should not be able to download file "/Shares/testshare/textfile0.txt"
|
||||
And as "Alice" file "/Shares/testshare/child/testfile.txt" should not exist
|
||||
And as "Brian" file "/testshare/child/testfile.txt" should not exist
|
||||
And as "Alice" file "/Shares/testshare/testfile.txt" should exist
|
||||
And as "Brian" file "/testshare/testfile.txt" should exist
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
| new |
|
||||
|
||||
@skipOnReva
|
||||
Scenario Outline: moving a file to overwrite a file in a shared folder with no permissions
|
||||
@issue-1976
|
||||
Scenario Outline: sharee tries to move a file into same shared folder with same name
|
||||
Given using <dav-path-version> DAV path
|
||||
And user "Alice" has uploaded file with content "ownCloud test text file 0" to "textfile0.txt"
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Brian" has created folder "/testshare"
|
||||
And user "Brian" has uploaded file with content "Welcome to ownCloud" to "fileToCopy.txt"
|
||||
And user "Brian" has created folder "testshare"
|
||||
And user "Brian" has uploaded file with content "test data" to "testshare/testfile.txt"
|
||||
And user "Brian" has created a share with settings
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| permissions | read |
|
||||
| shareWith | Alice |
|
||||
And user "Brian" has copied file "/fileToCopy.txt" to "/testshare/overwritethis.txt"
|
||||
When user "Alice" moves file "/textfile0.txt" to "/Shares/testshare/overwritethis.txt" using the WebDAV API
|
||||
| path | testshare |
|
||||
| shareType | user |
|
||||
| permissions | <permissions> |
|
||||
| shareWith | Alice |
|
||||
When user "Alice" moves folder "Shares/testshare/testfile.txt" to "Shares/testshare/testfile.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "403"
|
||||
And the content of file "/Shares/testshare/overwritethis.txt" for user "Alice" should be "Welcome to ownCloud"
|
||||
And as "Brian" the file with original path "testshare/testfile.txt" should not exist in the trashbin
|
||||
And the content of file "Shares/testshare/testfile.txt" for user "Alice" should be "test data"
|
||||
And the content of file "testshare/testfile.txt" for user "Brian" should be "test data"
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
| new |
|
||||
| dav-path-version | permissions |
|
||||
| old | all |
|
||||
| old | change |
|
||||
| old | read |
|
||||
| new | all |
|
||||
| new | change |
|
||||
| new | read |
|
||||
|
||||
Reference in New Issue
Block a user