mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-29 00:11:21 -05:00
156 lines
7.5 KiB
Gherkin
156 lines
7.5 KiB
Gherkin
Feature: moving/renaming file using file id
|
|
As a user
|
|
I want to be able to move or rename files using file id
|
|
So that I can manage my file system
|
|
|
|
Background:
|
|
Given using spaces DAV path
|
|
And user "Alice" has been created with default attributes and without skeleton files
|
|
|
|
|
|
Scenario Outline: move a file into a folder inside 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" moves a file "/textfile.txt" into "/folder" inside space "Personal" using file-id path "<dav-path>"
|
|
Then the HTTP status code should be "201"
|
|
And for user "Alice" folder "folder" of the space "Personal" should contain these files:
|
|
| textfile.txt |
|
|
But for user "Alice" the space "Personal" should not contain these entries:
|
|
| textfile.txt |
|
|
Examples:
|
|
| dav-path |
|
|
| /remote.php/dav/spaces/<<FILEID>> |
|
|
| /dav/spaces/<<FILEID>> |
|
|
|
|
|
|
Scenario Outline: move a file into a sub-folder inside 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" moves a file "/textfile.txt" into "/folder/sub-folder" inside space "Personal" using file-id path "<dav-path>"
|
|
Then the HTTP status code should be "201"
|
|
And for user "Alice" folder "folder/sub-folder/" of the space "Personal" should contain these files:
|
|
| textfile.txt |
|
|
But for user "Alice" the space "Personal" should not contain these entries:
|
|
| textfile.txt |
|
|
Examples:
|
|
| dav-path |
|
|
| /remote.php/dav/spaces/<<FILEID>> |
|
|
| /dav/spaces/<<FILEID>> |
|
|
|
|
|
|
Scenario Outline: move a file from 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"
|
|
And we save it into "FILEID"
|
|
When user "Alice" moves a file "folder/textfile.txt" into "/" inside space "Personal" using file-id path "<dav-path>"
|
|
Then the HTTP status code should be "201"
|
|
And for user "Alice" the space "Personal" should contain these entries:
|
|
| textfile.txt |
|
|
But for user "Alice" folder "folder" of the space "Personal" should not contain these files:
|
|
| textfile.txt |
|
|
Examples:
|
|
| dav-path |
|
|
| /remote.php/dav/spaces/<<FILEID>> |
|
|
| /dav/spaces/<<FILEID>> |
|
|
|
|
|
|
Scenario Outline: move a file from sub-folder to root inside 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" moves a file "folder/sub-folder/textfile.txt" into "/" inside space "Personal" using file-id path "<dav-path>"
|
|
Then the HTTP status code should be "201"
|
|
And for user "Alice" the space "Personal" should contain these entries:
|
|
| textfile.txt |
|
|
But for user "Alice" folder "folder/sub-folder" of the space "Personal" should not contain these files:
|
|
| textfile.txt |
|
|
Examples:
|
|
| dav-path |
|
|
| /remote.php/dav/spaces/<<FILEID>> |
|
|
| /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"
|
|
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 "201"
|
|
And for user "Alice" the space "Personal" should contain these entries:
|
|
| renamed.txt |
|
|
But for user "Alice" the space "Personal" should not contain these entries:
|
|
| textfile.txt |
|
|
Examples:
|
|
| dav-path |
|
|
| /remote.php/dav/spaces/<<FILEID>> |
|
|
| /dav/spaces/<<FILEID>> |
|
|
|
|
|
|
Scenario Outline: rename a file and move into a folder inside 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" renames a file "textfile.txt" into "/folder/renamed.txt" inside space "Personal" using file-id path "<dav-path>"
|
|
Then the HTTP status code should be "201"
|
|
And for user "Alice" folder "folder" of the space "Personal" should contain these files:
|
|
| renamed.txt |
|
|
But for user "Alice" the space "Personal" should not contain these entries:
|
|
| textfile.txt |
|
|
Examples:
|
|
| dav-path |
|
|
| /remote.php/dav/spaces/<<FILEID>> |
|
|
| /dav/spaces/<<FILEID>> |
|
|
|
|
|
|
Scenario Outline: rename a file and move into a sub-folder inside 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" renames a file "textfile.txt" into "/folder/sub-folder/renamed.txt" inside space "Personal" using file-id path "<dav-path>"
|
|
Then the HTTP status code should be "201"
|
|
And for user "Alice" folder "folder/sub-folder" of the space "Personal" should contain these files:
|
|
| renamed.txt |
|
|
But for user "Alice" the space "Personal" should not contain these entries:
|
|
| textfile.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"
|
|
And we save it into "FILEID"
|
|
When user "Alice" renames a file "folder/textfile.txt" into "/renamed.txt" inside space "Personal" using file-id path "<dav-path>"
|
|
Then the HTTP status code should be "201"
|
|
And for user "Alice" the space "Personal" should contain these entries:
|
|
| renamed.txt |
|
|
But for user "Alice" folder "folder" of the space "Personal" 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 sub-folder to root inside 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" renames a file "folder/sub-folder/textfile.txt" into "/renamed.txt" inside space "Personal" using file-id path "<dav-path>"
|
|
Then the HTTP status code should be "201"
|
|
And for user "Alice" the space "Personal" should contain these entries:
|
|
| renamed.txt |
|
|
But for user "Alice" folder "folder/sub-folder" of the space "Personal" should not contain these files:
|
|
| textfile.txt |
|
|
Examples:
|
|
| dav-path |
|
|
| /remote.php/dav/spaces/<<FILEID>> |
|
|
| /dav/spaces/<<FILEID>> |
|