Initial QSfera import
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
Feature: Download file in project space
|
||||
As a user with different role
|
||||
I want to be able to download files
|
||||
So that I can have it in my local storage
|
||||
|
||||
Background:
|
||||
Given these users have been created with default attributes:
|
||||
| username |
|
||||
| Alice |
|
||||
| Brian |
|
||||
| Bob |
|
||||
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 "download file" with the default quota using the Graph API
|
||||
And user "Alice" has uploaded a file inside space "download file" with content "some content" to "file.txt"
|
||||
And user "Alice" has sent the following space share invitation:
|
||||
| space | download file |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | Space Editor |
|
||||
And user "Alice" has sent the following space share invitation:
|
||||
| space | download file |
|
||||
| sharee | Bob |
|
||||
| shareType | user |
|
||||
| permissionsRole | Space Viewer |
|
||||
|
||||
|
||||
Scenario Outline: user downloads a file in the project space
|
||||
When user "<user>" downloads the file "file.txt" of the space "download file" using the WebDAV API
|
||||
Then the HTTP status code should be "200"
|
||||
And the following headers should be set
|
||||
| header | value |
|
||||
| Content-Length | 12 |
|
||||
Examples:
|
||||
| user |
|
||||
| Alice |
|
||||
| Brian |
|
||||
| Bob |
|
||||
|
||||
|
||||
Scenario Outline: users with role manager and editor can download an old version of the file in the project space
|
||||
Given user "Alice" has uploaded a file inside space "download file" with content "new content" to "file.txt"
|
||||
And user "Alice" has uploaded a file inside space "download file" with content "newest content" to "file.txt"
|
||||
When user "<user>" downloads version of the file "file.txt" with the index "1" of the space "download file" using the WebDAV API
|
||||
Then the HTTP status code should be "200"
|
||||
And the following headers should be set
|
||||
| header | value |
|
||||
| Content-Length | 11 |
|
||||
When user "<user>" downloads version of the file "file.txt" with the index "2" of the space "download file" using the WebDAV API
|
||||
Then the HTTP status code should be "200"
|
||||
And the following headers should be set
|
||||
| header | value |
|
||||
| Content-Length | 12 |
|
||||
Examples:
|
||||
| user |
|
||||
| Alice |
|
||||
| Brian |
|
||||
|
||||
|
||||
Scenario: user with role viewer cannot get versions of a file in the project space
|
||||
Given user "Alice" has uploaded a file inside space "download file" with content "new content" to "file.txt"
|
||||
And user "Alice" has uploaded a file inside space "download file" with content "newest content" to "file.txt"
|
||||
When user "Bob" tries to get versions of the file "file.txt" from the space "download file" using the WebDAV API
|
||||
Then the HTTP status code should be "403"
|
||||
When user "Bob" tries to download version of the file "file.txt" with the index "1" of the space "download file" using the WebDAV API
|
||||
Then the HTTP status code should be "403"
|
||||
@@ -0,0 +1,63 @@
|
||||
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:
|
||||
| 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 Graph API
|
||||
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 "zip" 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 sent the following space share invitation:
|
||||
| space | Project-space |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | <space-role> |
|
||||
When user "Brian" downloads the space "Project-space" using the WebDAV API
|
||||
Then the HTTP status code should be "200"
|
||||
And the downloaded "zip" archive should contain these files:
|
||||
| name | content |
|
||||
| file1.txt | some data |
|
||||
| .space/readme.md | space description |
|
||||
Examples:
|
||||
| space-role |
|
||||
| Manager |
|
||||
| Space Editor |
|
||||
| Space Viewer |
|
||||
|
||||
|
||||
Scenario Outline: admin/space-admin tries to download a space that they do not have access to
|
||||
Given the administrator has assigned the role "<user-role>" 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:
|
||||
| user-role |
|
||||
| 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"
|
||||
Reference in New Issue
Block a user