mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-28 09:29:41 -06:00
[tests-only] Extend API test coverage for MOVE between spaces using file-id (#8126)
* add issue tags * extend API test coverage for MOVE between spaces using file-id * fix table header * re-arrange scenarios * update expected failure * update expected failure
This commit is contained in:
@@ -212,6 +212,7 @@ The expected failures in this file are from features in the owncloud/ocis repo.
|
||||
- [apiLocks/lockFiles.feature:369](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/lockFiles.feature#L369)
|
||||
|
||||
### [Anonymous users can unlock a file shared to them through a public link if they get the lock token](https://github.com/owncloud/ocis/issues/7761)
|
||||
|
||||
- [apiLocks/unlockFiles.feature:40](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L40)
|
||||
- [apiLocks/unlockFiles.feature:41](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L41)
|
||||
- [apiLocks/unlockFiles.feature:42](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L42)
|
||||
@@ -220,6 +221,7 @@ The expected failures in this file are from features in the owncloud/ocis repo.
|
||||
- [apiLocks/unlockFiles.feature:45](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L45)
|
||||
|
||||
### [Trying to unlock a shared file with sharer's lock token gives 500](https://github.com/owncloud/ocis/issues/7767)
|
||||
|
||||
- [apiLocks/unlockFiles.feature:107](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L107)
|
||||
- [apiLocks/unlockFiles.feature:108](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L108)
|
||||
- [apiLocks/unlockFiles.feature:109](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L109)
|
||||
@@ -234,6 +236,7 @@ The expected failures in this file are from features in the owncloud/ocis repo.
|
||||
- [apiLocks/unlockFiles.feature:134](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L134)
|
||||
|
||||
### [Anonymous user trying lock a file shared to them through a public link gives 405](https://github.com/owncloud/ocis/issues/7790)
|
||||
|
||||
- [apiLocks/lockFiles.feature:474](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/lockFiles.feature#L474)
|
||||
- [apiLocks/lockFiles.feature:475](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/lockFiles.feature#L475)
|
||||
- [apiLocks/lockFiles.feature:476](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/lockFiles.feature#L476)
|
||||
@@ -248,6 +251,7 @@ The expected failures in this file are from features in the owncloud/ocis repo.
|
||||
- [apiLocks/lockFiles.feature:501](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/lockFiles.feature#L501)
|
||||
|
||||
### [anonymous user with viewer role in public link of a folder can lock a file inside it](https://github.com/owncloud/ocis/issues/7785)
|
||||
|
||||
- [apiLocks/lockFiles.feature:452](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/lockFiles.feature#L452)
|
||||
- [apiLocks/lockFiles.feature:453](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/lockFiles.feature#L453)
|
||||
- [apiLocks/lockFiles.feature:454](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/lockFiles.feature#L454)
|
||||
@@ -256,6 +260,7 @@ The expected failures in this file are from features in the owncloud/ocis repo.
|
||||
- [apiLocks/lockFiles.feature:457](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/lockFiles.feature#L457)
|
||||
|
||||
### [blocksDownload link type is not implemented yet (sharing-ng)](https://github.com/owncloud/ocis/issues/7879)
|
||||
|
||||
- [apiSharingNg/linkShare.feature:78](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg/linkShare.feature#L78)
|
||||
- [apiSharingNg/linkShare.feature:147](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg/linkShare.feature#L147)
|
||||
- [apiSharingNg/linkShare.feature:225](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg/linkShare.feature#L225)
|
||||
@@ -265,5 +270,71 @@ The expected failures in this file are from features in the owncloud/ocis repo.
|
||||
- [apiSharingNg/linkShare.feature:447](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg/linkShare.feature#L447)
|
||||
- [apiSharingNg/linkShare.feature:448](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg/linkShare.feature#L448)
|
||||
- [apiSharingNg/linkShare.feature:449](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg/linkShare.feature#L449)
|
||||
|
||||
### [sharee (editor role) MOVE a file by file-id into same shared folder returns 403](https://github.com/owncloud/ocis/issues/7617)
|
||||
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:407](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L407)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:408](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L408)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:409](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L409)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:410](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L410)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:629](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L629)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:630](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L630)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:631](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L631)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:632](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L632)
|
||||
|
||||
### [MOVE a file from Project space (manager/editor) to Personal space returns 502 code](https://github.com/owncloud/ocis/issues/7618)
|
||||
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:117](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L117)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:118](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L118)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:120](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L120)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:121](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L121)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:139](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L139)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:140](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L140)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:362](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L362)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:363](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L363)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:365](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L365)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:366](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L366)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:384](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L384)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:385](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L385)
|
||||
- [apiSpacesShares/moveSpaces.feature:95](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L95)
|
||||
- [apiSpacesShares/moveSpaces.feature:96](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L96)
|
||||
- [apiSpacesShares/moveSpaces.feature:143](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L143)
|
||||
- [apiSpacesShares/moveSpaces.feature:144](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L144)
|
||||
|
||||
### [MOVE a file from Project space (manager/editor) to Project space (manager/editor) returns 502 code](https://github.com/owncloud/ocis/issues/8116)
|
||||
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:264](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L264)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:265](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L265)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:266](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L266)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:267](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L267)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:273](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L273)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:274](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L274)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:275](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L275)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:276](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L276)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:302](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L302)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:303](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L303)
|
||||
- [apiSpacesShares/moveSpaces.feature:69](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L69)
|
||||
- [apiSpacesShares/moveSpaces.feature:70](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L70)
|
||||
- [apiSpacesShares/moveSpaces.feature:71](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L71)
|
||||
- [apiSpacesShares/moveSpaces.feature:72](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L72)
|
||||
|
||||
### [sharee (editor role) MOVE a file by file-id into Personal space responds with 502 instead of 403](https://github.com/owncloud/ocis/issues/8124)
|
||||
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:486](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L486)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:487](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L487)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:488](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L488)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:489](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L489)
|
||||
|
||||
### [sharee (editor role) MOVE a file by file-id into Project space (manager/editor role) responds with 502 instead of 403](https://github.com/owncloud/ocis/issues/8125)
|
||||
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:513](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L513)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:514](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L514)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:516](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L516)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:517](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L517)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:522](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L522)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:523](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L523)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:525](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L525)
|
||||
- [apiSpacesDavOperation/moveByFileId.feature:526](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L526)
|
||||
|
||||
- Note: always have an empty line at the end of this file.
|
||||
The bash script that processes this file requires that the last line has a newline on the end.
|
||||
The bash script that processes this file requires that the last line has a newline on the end.
|
||||
|
||||
@@ -74,18 +74,112 @@ Feature: moving/renaming file using file id
|
||||
| /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>> |
|
||||
|
||||
|
||||
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 +239,297 @@ 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 "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 "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 "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:
|
||||
| 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>> |
|
||||
|
||||
|
||||
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 +578,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 "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 "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 +610,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,7 @@ Feature: move (rename) file
|
||||
But for user "Alice" the space "Project" should contain these entries:
|
||||
| insideSpace.txt |
|
||||
|
||||
|
||||
@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 +59,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 +85,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 |
|
||||
|
||||
|
||||
@@ -114,17 +114,17 @@ Feature: move (rename) file
|
||||
| project.txt |
|
||||
Examples:
|
||||
| role | permissions |
|
||||
| manager | 31 |
|
||||
| editor | 31 |
|
||||
| viewer | 31 |
|
||||
| manager | 17 |
|
||||
| editor | 17 |
|
||||
| viewer | 17 |
|
||||
| manager | 1 |
|
||||
| editor | 1 |
|
||||
| viewer | 1 |
|
||||
|
||||
| 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
|
||||
@@ -133,15 +133,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 |
|
||||
|
||||
|
||||
@@ -157,9 +157,9 @@ Feature: move (rename) file
|
||||
| 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
|
||||
@@ -174,9 +174,9 @@ Feature: move (rename) file
|
||||
| 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
|
||||
@@ -196,15 +196,15 @@ Feature: move (rename) file
|
||||
| testshare.txt |
|
||||
Examples:
|
||||
| role | permissions |
|
||||
| manager | 31 |
|
||||
| editor | 31 |
|
||||
| viewer | 31 |
|
||||
| manager | 17 |
|
||||
| editor | 17 |
|
||||
| viewer | 17 |
|
||||
| manager | 1 |
|
||||
| editor | 1 |
|
||||
| viewer | 1 |
|
||||
| manager | all |
|
||||
| editor | all |
|
||||
| viewer | all |
|
||||
| manager | change |
|
||||
| editor | change |
|
||||
| viewer | change |
|
||||
| manager | read |
|
||||
| editor | read |
|
||||
| viewer | read |
|
||||
|
||||
|
||||
Scenario Outline: user moves a file from space Shares to another space Shares with different role (permissions)
|
||||
@@ -221,15 +221,15 @@ Feature: move (rename) file
|
||||
| testshare1.txt |
|
||||
Examples:
|
||||
| from_permissions | to_permissions |
|
||||
| 31 | 31 |
|
||||
| 31 | 17 |
|
||||
| 31 | 1 |
|
||||
| 17 | 31 |
|
||||
| 17 | 17 |
|
||||
| 17 | 1 |
|
||||
| 1 | 31 |
|
||||
| 1 | 17 |
|
||||
| 1 | 1 |
|
||||
| all | all |
|
||||
| all | change |
|
||||
| all | read |
|
||||
| change | all |
|
||||
| change | change |
|
||||
| change | read |
|
||||
| read | all |
|
||||
| read | change |
|
||||
| read | read |
|
||||
|
||||
|
||||
Scenario Outline: moving a file out of a shared folder as a sharer
|
||||
@@ -245,9 +245,9 @@ Feature: move (rename) file
|
||||
| testfile.txt |
|
||||
Examples:
|
||||
| permissions |
|
||||
| 31 |
|
||||
| 17 |
|
||||
| 1 |
|
||||
| all |
|
||||
| change |
|
||||
| read |
|
||||
|
||||
|
||||
Scenario Outline: moving a folder out of a shared folder as a sharer
|
||||
@@ -266,9 +266,9 @@ Feature: move (rename) file
|
||||
| testsubfolder |
|
||||
Examples:
|
||||
| permissions |
|
||||
| 31 |
|
||||
| 17 |
|
||||
| 1 |
|
||||
| all |
|
||||
| change |
|
||||
| read |
|
||||
|
||||
|
||||
Scenario Outline: sharee moves a file within a Shares space (all/change permissions)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user