Skip to content

Commit

Permalink
add test for copy with fileID
Browse files Browse the repository at this point in the history
  • Loading branch information
nabim777 committed Oct 5, 2023
1 parent c1dcc42 commit 90c8a40
Showing 1 changed file with 76 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,79 @@ Feature: copying file using file id
| dav-path |
| /remote.php/dav/spaces/<<FILEID>> |
| /dav/spaces/<<FILEID>> |


Scenario Outline: copy a file into a folder in project space
Given using spaces DAV path
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 GraphApi
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" copies 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 "/" of the space "project-space" should contain these files:
| textfile.txt |
And for user "Alice" folder "folder" of the space "project-space" should contain these files:
| textfile.txt |
Examples:
| dav-path |
| /remote.php/dav/spaces/<<FILEID>> |
| /dav/spaces/<<FILEID>> |


Scenario Outline: copy a file into a sub-folder in project space
Given using spaces DAV path
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 GraphApi
And user "Alice" has created a folder "folder/sub-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" copies a file "/textfile.txt" into "/folder/sub-folder" inside space "project-space" using file-id path "<dav-path>"
Then the HTTP status code should be "201"
And for user "Alice" folder "/" of the space "project-space" should contain these files:
| textfile.txt |
And for user "Alice" folder "folder/sub-folder" of the space "project-space" should contain these files:
| textfile.txt |
Examples:
| dav-path |
| /remote.php/dav/spaces/<<FILEID>> |
| /dav/spaces/<<FILEID>> |


Scenario Outline: copy a file from a folder into root of project space
Given using spaces DAV path
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 GraphApi
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 "folder/textfile.txt"
And we save it into "FILEID"
When user "Alice" copies a file "folder/textfile.txt" into "/" inside space "project-space" using file-id path "<dav-path>"
Then the HTTP status code should be "201"
And for user "Alice" folder "/" of the space "project-space" should contain these files:
| textfile.txt |
And for user "Alice" folder "folder" of the space "project-space" should contain these files:
| textfile.txt |
Examples:
| dav-path |
| /remote.php/dav/spaces/<<FILEID>> |
| /dav/spaces/<<FILEID>> |


Scenario Outline: copy a file from sub-folder into root of project space
Given using spaces DAV path
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 GraphApi
And user "Alice" has created a folder "folder/sub-folder" in space "project-space"
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "folder/sub-folder/textfile.txt"
And we save it into "FILEID"
When user "Alice" copies a file "folder/sub-folder/textfile.txt" into "/" inside space "project-space" using file-id path "<dav-path>"
Then the HTTP status code should be "201"
And for user "Alice" folder "/" of the space "project-space" should contain these files:
| textfile.txt |
And for user "Alice" folder "folder/sub-folder" of the space "project-space" should contain these files:
| textfile.txt |
Examples:
| dav-path |
| /remote.php/dav/spaces/<<FILEID>> |
| /dav/spaces/<<FILEID>> |

0 comments on commit 90c8a40

Please sign in to comment.