[tests-only] add API test coverage for file MOVE to space-id as destination (#8459)
This commit is contained in:
@@ -706,3 +706,67 @@ Feature: moving/renaming file using file id
|
||||
| dav-path |
|
||||
| /remote.php/dav/spaces/<<FILEID>> |
|
||||
| /dav/spaces/<<FILEID>> |
|
||||
|
||||
@issue-6739
|
||||
Scenario Outline: try to move personal file to other spaces using its id as the destination
|
||||
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "myspace" with the default quota using the Graph API
|
||||
And user "Alice" has uploaded file with content "some data" to "textfile.txt"
|
||||
When user "Alice" tries to move file "textfile.txt" of space "Personal" to space "<space>" using its id in destination path "<dav-path>"
|
||||
Then the HTTP status code should be "400"
|
||||
And for user "Alice" the space "Personal" should contain these entries:
|
||||
| textfile.txt |
|
||||
Examples:
|
||||
| dav-path | space |
|
||||
| /remote.php/dav/spaces | Personal |
|
||||
| /dav/spaces | Personal |
|
||||
| /remote.php/dav/spaces | myspace |
|
||||
| /dav/spaces | myspace |
|
||||
|
||||
@issue-6739
|
||||
Scenario Outline: try to move project file to other spaces using its id as the destination
|
||||
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "myspace" with the default quota using the Graph API
|
||||
And user "Alice" has uploaded a file inside space "myspace" with content "some data" to "textfile.txt"
|
||||
When user "Alice" tries to move file "textfile.txt" of space "myspace" to space "<space>" using its id in destination path "<dav-path>"
|
||||
Then the HTTP status code should be "400"
|
||||
And for user "Alice" the space "myspace" should contain these entries:
|
||||
| textfile.txt |
|
||||
Examples:
|
||||
| dav-path | space |
|
||||
| /remote.php/dav/spaces | Personal |
|
||||
| /dav/spaces | Personal |
|
||||
| /remote.php/dav/spaces | myspace |
|
||||
| /dav/spaces | myspace |
|
||||
|
||||
@issue-6739
|
||||
Scenario Outline: move a file to folder using its id as the destination (Personal space)
|
||||
Given user "Alice" has uploaded file with content "some data" to "textfile.txt"
|
||||
And user "Alice" has created folder "docs"
|
||||
When user "Alice" moves file "textfile.txt" of space "Personal" to folder "docs" using its id in destination path "<dav-path>"
|
||||
Then the HTTP status code should be "204"
|
||||
And the content of file "docs" for user "Alice" should be "some data"
|
||||
And as "Alice" file "textfile.txt" should not exist
|
||||
And as "Alice" folder "docs" should not exist
|
||||
And as "Alice" folder "docs" should exist in the trashbin of the space "Personal"
|
||||
Examples:
|
||||
| dav-path |
|
||||
| /remote.php/dav/spaces |
|
||||
| /dav/spaces |
|
||||
|
||||
@issue-6739
|
||||
Scenario Outline: move a file to folder using its id as the destination (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 "myspace" with the default quota using the Graph API
|
||||
And user "Alice" has uploaded a file inside space "myspace" with content "some data" to "textfile.txt"
|
||||
And user "Alice" has created a folder "docs" in space "myspace"
|
||||
When user "Alice" moves file "textfile.txt" of space "myspace" to folder "docs" using its id in destination path "<dav-path>"
|
||||
Then the HTTP status code should be "204"
|
||||
And for user "Alice" the content of the file "docs" of the space "myspace" should be "some data"
|
||||
And as "Alice" folder "docs" should exist in the trashbin of the space "myspace"
|
||||
And for user "Alice" folder "/" of the space "myspace" should not contain these files:
|
||||
| textfile.txt |
|
||||
Examples:
|
||||
| dav-path |
|
||||
| /remote.php/dav/spaces |
|
||||
| /dav/spaces |
|
||||
|
||||
Reference in New Issue
Block a user