-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
28b6f05
commit 9f9a5c0
Showing
6 changed files
with
89 additions
and
30 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -109,6 +109,7 @@ config = { | |
"apiSpacesShares", | ||
"apiCors", | ||
"apiAsyncUpload", | ||
"apiDownloads", | ||
], | ||
"skip": False, | ||
}, | ||
|
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
File renamed without changes.
62 changes: 62 additions & 0 deletions
62
tests/acceptance/features/apiDownloads/spaceDownload.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,62 @@ | ||
@api | ||
Feature: Download space | ||
As a user | ||
I want to download space | ||
So that I can store it locally | ||
|
||
|
||
Background: | ||
Given these users have been created with default attributes and without skeleton files: | ||
| username | | ||
| Alice | | ||
| Brian | | ||
And 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 uploaded a file inside space "Project-space" with content "some data" to "file1.txt" | ||
And user "Alice" has created a folder ".space" in space "Project-space" | ||
And user "Alice" has uploaded a file inside space "Project-space" with content "space description" to ".space/readme.md" | ||
|
||
|
||
Scenario: user downloads a space | ||
Given user "Alice" has uploaded a file inside space "Project-space" with content "other data" to "file2.txt" | ||
When user "Alice" downloads the space "Project-space" using the WebDAV API | ||
Then the HTTP status code should be "200" | ||
And the downloaded "tar" archive should contain these files: | ||
| name | content | | ||
| file1.txt | some data | | ||
| file2.txt | other data | | ||
| .space/readme.md | space description | | ||
|
||
|
||
Scenario Outline: user downloads a shared space (shared by others) | ||
Given user "Alice" has shared a space "Project-space" with settings: | ||
| shareWith | Brian | | ||
| role | <role> | | ||
When user "Brian" downloads the space "Project-space" using the WebDAV API | ||
Then the HTTP status code should be "200" | ||
And the downloaded "tar" archive should contain these files: | ||
| name | content | | ||
| file1.txt | some data | | ||
| .space/readme.md | space description | | ||
Examples: | ||
| role | | ||
| manager | | ||
| editor | | ||
| viewer | | ||
|
||
|
||
Scenario Outline: admin/space-admin triesO to download a space that they do not have access to | ||
Given the administrator has assigned the role "<userRole>" to user "Brian" using the Graph API | ||
When user "Brian" tries to download the space "Project-space" owned by user "Alice" using the WebDAV API | ||
Then the HTTP status code should be "404" | ||
Examples: | ||
| userRole | | ||
| Admin | | ||
| Space Admin | | ||
|
||
|
||
Scenario: user tries to download disabled space | ||
Given user "Alice" has disabled a space "Project-space" | ||
When user "Alice" tries to download the space "Project-space" using the WebDAV API | ||
Then the HTTP status code should be "404" |
This file was deleted.
Oops, something went wrong.
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