-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added test for the copy with file-id in url
- Loading branch information
Showing
2 changed files
with
87 additions
and
3 deletions.
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
tests/acceptance/features/apiSpacesDavOperation/copyByFileId.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
Feature: copying file/folder using file id | ||
As a user | ||
I want to copy the file/folder using file id | ||
So that I can manage my resource | ||
|
||
Background: | ||
Given using spaces DAV path | ||
And user "Alice" has been created with default attributes and without skeleton files | ||
|
||
Scenario Outline: copy a file into a folder in personal space | ||
Given user "Alice" has created folder "/folder" | ||
And user "Alice" has uploaded file with content "some data" to "/textfile.txt" | ||
And we save it into "FILEID" | ||
When user "Alice" copies a file with file_id in URL "<dav-path>" to "/folder/textfile.txt" inside space "Personal" | ||
Then the HTTP status code should be "201" | ||
And for user "Alice" the space "Personal" should contain these entries: | ||
| folder/textfile.txt | | ||
Examples: | ||
| dav-path | | ||
| /remote.php/dav/spaces/<<FILEID>> | | ||
| /dav/spaces/<<FILEID>> | | ||
|
||
|
||
Scenario Outline: copy a file into a sub-folder in personal space | ||
Given 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 "/textfile.txt" | ||
And we save it into "FILEID" | ||
When user "Alice" copies a file with file_id in URL "<dav-path>" to "/folder/sub-folder/textfile.txt" inside space "Personal" | ||
Then the HTTP status code should be "201" | ||
And for user "Alice" the space "Personal" should contain these entries: | ||
| folder/sub-folder/textfile.txt | | ||
Examples: | ||
| dav-path | | ||
| /remote.php/dav/spaces/<<FILEID>> | | ||
| /dav/spaces/<<FILEID>> | | ||
|
||
|
||
Scenario Outline: copy a file from folder to root in personal space | ||
Given user "Alice" has created folder "/folder" | ||
And user "Alice" has uploaded file with content "some data" to "folder/textfile.txt" | ||
And we save it into "FILEID" | ||
When user "Alice" copies a file with file_id in URL "<dav-path>" to "/textfile.txt" inside space "Personal" | ||
Then the HTTP status code should be "201" | ||
And for user "Alice" the space "Personal" should contain these entries: | ||
| textfile.txt | | ||
Examples: | ||
| dav-path | | ||
| /remote.php/dav/spaces/<<FILEID>> | | ||
| /dav/spaces/<<FILEID>> | | ||
|
||
|
||
Scenario Outline: copy a file from sub-folder to root in personal space | ||
Given 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/textfile.txt" | ||
And we save it into "FILEID" | ||
When user "Alice" copies a file with file_id in URL "<dav-path>" to "/textfile.txt" inside space "Personal" | ||
Then the HTTP status code should be "201" | ||
And for user "Alice" the space "Personal" should contain these entries: | ||
| textfile.txt | | ||
Examples: | ||
| dav-path | | ||
| /remote.php/dav/spaces/<<FILEID>> | | ||
| /dav/spaces/<<FILEID>> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters