mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-16 09:09:51 -06:00
Reword Spaces API scenario descriptions
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
@api @skipOnOcV10
|
||||
Feature: Change data of space
|
||||
As a user
|
||||
I want to be able to change the data of the created space(increase the quota, change name, etc.)
|
||||
As a user with admin rights
|
||||
I want to be able to change the data of a created space (increase the quota, change name, etc.)
|
||||
|
||||
Note - this feature is run in CI with ACCOUNTS_HASH_DIFFICULTY set to the default for production
|
||||
See https://github.com/owncloud/ocis/issues/1542 and https://github.com/owncloud/ocis/pull/839
|
||||
@@ -10,7 +10,7 @@ Feature: Change data of space
|
||||
Given user "Alice" has been created with default attributes and without skeleton files
|
||||
And the administrator has given "Alice" the role "Admin" using the settings api
|
||||
|
||||
Scenario: Alice changes a name of the space via the Graph api, she expects a 200 code and checks that the space name has changed
|
||||
Scenario: An admin user can change the name of a Space via the Graph API
|
||||
Given user "Alice" has created a space "Project Jupiter" of type "project" with quota "20"
|
||||
When user "Alice" changes the name of the "Project Jupiter" space to "Project Death Star"
|
||||
Then the HTTP status code should be "200"
|
||||
@@ -22,7 +22,7 @@ Feature: Change data of space
|
||||
| quota@@@total | 20 |
|
||||
| root@@@webDavUrl | %base_url%/dav/spaces/%space_id% |
|
||||
|
||||
Scenario: Alice increases quota of the space via the Graph api, she expects a 200 code and checks that the quota has changed
|
||||
Scenario: An admin user can increase the quota of a Space via the Graph API
|
||||
Given user "Alice" has created a space "Project Earth" of type "project" with quota "20"
|
||||
When user "Alice" changes the quota of the "Project Earth" space to "100"
|
||||
Then the HTTP status code should be "200"
|
||||
|
||||
@@ -9,7 +9,7 @@ Feature: List and create spaces
|
||||
Background:
|
||||
Given user "Alice" has been created with default attributes and without skeleton files
|
||||
|
||||
Scenario: Alice request her space via the Graph api, she expects a 200 code and the correct data in the response
|
||||
Scenario: An ordinary user can request information about their Space via the Graph API
|
||||
When user "Alice" lists all available spaces via the GraphApi
|
||||
Then the HTTP status code should be "200"
|
||||
And the json responded should contain a space "Alice Hansen" with these key and value pairs:
|
||||
@@ -20,16 +20,16 @@ Feature: List and create spaces
|
||||
| quota@@@state | normal |
|
||||
| root@@@webDavUrl | %base_url%/dav/spaces/%space_id% |
|
||||
|
||||
Scenario: Alice requests her space via webDav api, she expects a 207 code
|
||||
Scenario: An ordinary user can access their Space via the webDav API
|
||||
When user "Alice" lists all available spaces via the GraphApi
|
||||
And user "Alice" lists the content of the space with the name "Alice Hansen" using the WebDav Api
|
||||
Then the HTTP status code should be "207"
|
||||
|
||||
Scenario: Alice tries to create Space via Graph api without permission, she expects a response of 401
|
||||
Scenario: An ordinary user cannot create a Space via Graph API
|
||||
When user "Alice" creates a space "Project Mars" of type "project" with the default quota using the GraphApi
|
||||
Then the HTTP status code should be "401"
|
||||
|
||||
Scenario: Alice creates Space via Graph api with default quota, she expects a 201 code the correct data and that space exists
|
||||
Scenario: An admin user can create a Space via the Graph API with default quota
|
||||
Given the administrator has given "Alice" the role "Admin" using the settings api
|
||||
When user "Alice" creates a space "Project Mars" of type "project" with the default quota using the GraphApi
|
||||
Then the HTTP status code should be "201"
|
||||
@@ -44,7 +44,7 @@ Feature: List and create spaces
|
||||
Then the propfind result of the space should contain these entries:
|
||||
| .space/ |
|
||||
|
||||
Scenario: Alice creates Space via Graph api with certain quota, she expects a 201 code and the correct data in the response
|
||||
Scenario: An admin user can create a Space via the Graph API with certain quota
|
||||
Given the administrator has given "Alice" the role "Admin" using the settings api
|
||||
When user "Alice" creates a space "Project Venus" of type "project" with quota "2000" using the GraphApi
|
||||
Then the HTTP status code should be "201"
|
||||
|
||||
@@ -14,11 +14,11 @@ Feature: State of the quota
|
||||
Background:
|
||||
Given user "Alice" has been created with default attributes and without skeleton files
|
||||
And the administrator has given "Alice" the role "Admin" using the settings api
|
||||
|
||||
|
||||
Scenario Outline: check the quota display
|
||||
Given user "Alice" has created a space "<spaceName>" of type "project" with quota "<total>"
|
||||
And user "Alice" has uploaded a file inside space "<spaceName>" with content "<fileContent>" to "test.txt"
|
||||
|
||||
Scenario Outline: Quota information is returned in the list of spaces returned via the Graph API
|
||||
Given user "Alice" has created a space "<spaceName>" of type "project" with quota "<total>"
|
||||
And user "Alice" has uploaded a file inside space "<spaceName>" with content "<fileContent>" to "test.txt"
|
||||
When user "Alice" lists all available spaces via the GraphApi
|
||||
Then the json responded should contain a space "<spaceName>" with these key and value pairs:
|
||||
| key | value |
|
||||
@@ -37,32 +37,31 @@ Feature: State of the quota
|
||||
| Quota99% | 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 | critical | 100 | 1 | 99 |
|
||||
| Quota100% | 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 1234567890 | exceeded | 100 | 0 | 100 |
|
||||
|
||||
|
||||
Scenario: uploading a file with an insufficient quota
|
||||
Given user "Alice" has created a space "Project Alfa" of type "project" with quota "10"
|
||||
|
||||
Scenario: A file cannot be uploaded if there is insufficient quota
|
||||
Given user "Alice" has created a space "Project Alfa" of type "project" with quota "10"
|
||||
When user "Alice" uploads a file inside space "Project Alfa" with content "More than 10 bytes" to "test.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "507"
|
||||
|
||||
|
||||
Scenario: creating a folder with an insufficient quota
|
||||
Scenario: A folder can be created even if there is insufficient quota for file content
|
||||
Given user "Alice" has created a space "Project Beta" of type "project" with quota "7"
|
||||
And user "Alice" has uploaded a file inside space "Project Beta" with content "7 bytes" to "test.txt"
|
||||
When user "Alice" creates a folder "NewFolder" in space "Project Beta" using the WebDav Api
|
||||
Then the HTTP status code should be "201"
|
||||
Then the HTTP status code should be "201"
|
||||
And for user "Alice" the space "Project Beta" should contain these entries:
|
||||
| NewFolder |
|
||||
|
||||
|
||||
Scenario: overwriting a file with an enough quota
|
||||
Given user "Alice" has created a space "Project Gamma" of type "project" with quota "10"
|
||||
And user "Alice" has uploaded a file inside space "Project Gamma" with content "7 bytes" to "test.txt"
|
||||
Scenario: A file can be overwritten if there is enough quota
|
||||
Given user "Alice" has created a space "Project Gamma" of type "project" with quota "10"
|
||||
And user "Alice" has uploaded a file inside space "Project Gamma" with content "7 bytes" to "test.txt"
|
||||
When user "Alice" uploads a file inside space "Project Gamma" with content "0010 bytes" to "test.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "204"
|
||||
|
||||
|
||||
Scenario: overwriting a file with an insufficient quota
|
||||
When user "Alice" has created a space "Project Delta" of type "project" with quota "10"
|
||||
And user "Alice" has uploaded a file inside space "Project Delta" with content "7 bytes" to "test.txt"
|
||||
Scenario: A file cannot be overwritten if there is insufficient quota
|
||||
When user "Alice" has created a space "Project Delta" of type "project" with quota "10"
|
||||
And user "Alice" has uploaded a file inside space "Project Delta" with content "7 bytes" to "test.txt"
|
||||
When user "Alice" uploads a file inside space "Project Delta" with content "00011 bytes" to "test.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "507"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@api @skipOnOcV10
|
||||
Feature: Share spaces
|
||||
As the owner of a space
|
||||
As the owner of a space
|
||||
I want to be able to add members to a space, and to remove access for them
|
||||
|
||||
Note - this feature is run in CI with ACCOUNTS_HASH_DIFFICULTY set to the default for production
|
||||
@@ -10,16 +10,16 @@ Feature: Share spaces
|
||||
Given user "Alice" has been created with default attributes and without skeleton files
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And the administrator has given "Alice" the role "Admin" using the settings api
|
||||
|
||||
|
||||
Scenario: Alice shares space to Brian, she expects a 200 response code
|
||||
Given user "Alice" has created a space "Space to share" of type "project" with quota "10"
|
||||
|
||||
|
||||
Scenario: A user can share a space to another user
|
||||
Given user "Alice" has created a space "Space to share" of type "project" with quota "10"
|
||||
When user "Alice" shares a space "Space to share" to user "Brian"
|
||||
Then the HTTP status code should be "200"
|
||||
|
||||
|
||||
Scenario: Brian checks that a shared space is available
|
||||
Given user "Alice" has created a space "Share space to Brian" of type "project" with quota "10"
|
||||
|
||||
|
||||
Scenario: A user can see that a received shared space is available
|
||||
Given user "Alice" has created a space "Share space to Brian" of type "project" with quota "10"
|
||||
And user "Alice" has shared a space "Share space to Brian" to user "Brian"
|
||||
When user "Brian" lists all available spaces via the GraphApi
|
||||
Then the json responded should contain a space "Share space to Brian" with these key and value pairs:
|
||||
@@ -31,24 +31,24 @@ Feature: Share spaces
|
||||
| root@@@webDavUrl | %base_url%/dav/spaces/%space_id% |
|
||||
|
||||
|
||||
Scenario: Brian can see files in shared space
|
||||
Given user "Alice" has created a space "Share space with file" of type "project" with quota "10"
|
||||
Scenario: A user can see a file in a received shared space
|
||||
Given user "Alice" has created a space "Share space with file" of type "project" with quota "10"
|
||||
And user "Alice" has uploaded a file inside space "Share space with file" with content "Test" to "test.txt"
|
||||
When user "Alice" has shared a space "Share space with file" to user "Brian"
|
||||
Then for user "Brian" the space "Share space with file" should contain these entries:
|
||||
| test.txt |
|
||||
|
||||
|
||||
Scenario: Brian can see folder in shared space
|
||||
Given user "Alice" has created a space "Share space with folder" of type "project" with quota "10"
|
||||
And user "Alice" has created a folder "Folder Main" in space "Share space with folder"
|
||||
|
||||
Scenario: A user can see a folder in received shared space
|
||||
Given user "Alice" has created a space "Share space with folder" of type "project" with quota "10"
|
||||
And user "Alice" has created a folder "Folder Main" in space "Share space with folder"
|
||||
When user "Alice" has shared a space "Share space with folder" to user "Brian"
|
||||
Then for user "Brian" the space "Share space with folder" should contain these entries:
|
||||
| Folder Main |
|
||||
|
||||
|
||||
Scenario: When Alice unshares space, the space becomes unavailable to Brian
|
||||
Given user "Alice" has created a space "Unshare space" of type "project" with quota "10"
|
||||
|
||||
Scenario: When a user unshares a space, the space becomes unavailable to the receiver
|
||||
Given user "Alice" has created a space "Unshare space" of type "project" with quota "10"
|
||||
And user "Alice" has shared a space "Unshare space" to user "Brian"
|
||||
When user "Brian" lists all available spaces via the GraphApi
|
||||
Then the json responded should contain a space "Unshare space" with these key and value pairs:
|
||||
@@ -60,4 +60,3 @@ Feature: Share spaces
|
||||
Then the HTTP status code should be "200"
|
||||
And user "Brian" lists all available spaces via the GraphApi
|
||||
And the json responded should not contain a space "Unshare space"
|
||||
|
||||
@@ -11,22 +11,22 @@ Feature: Upload files into a space
|
||||
And user "Bob" has been created with default attributes and without skeleton files
|
||||
And the administrator has given "Alice" the role "Admin" using the settings api
|
||||
|
||||
Scenario: Alice creates a folder via the Graph api in space, she expects a 201 code and she checks that folder exists
|
||||
Given user "Alice" has created a space "Project Ceres" of type "project" with quota "2000"
|
||||
Scenario: A user can create a folder in a Space via the Graph API
|
||||
Given user "Alice" has created a space "Project Ceres" of type "project" with quota "2000"
|
||||
When user "Alice" creates a folder "mainFolder" in space "Project Ceres" using the WebDav Api
|
||||
Then the HTTP status code should be "201"
|
||||
And for user "Alice" the space "Project Ceres" should contain these entries:
|
||||
| mainFolder |
|
||||
|
||||
Scenario: Bob creates a folder via the Graph api in a space, he expects a 404 code and Alice checks that this folder does not exist
|
||||
Scenario: A user cannot create a folder in a Space if they do not have permission
|
||||
Given user "Alice" has created a space "Project Merkur" of type "project" with quota "2000"
|
||||
And user "Bob" creates a folder "forAlice" in space "Project Merkur" owned by the user "Alice" using the WebDav Api
|
||||
Then the HTTP status code should be "404"
|
||||
And for user "Alice" the space "Project Merkur" should not contain these entries:
|
||||
| forAlice |
|
||||
|
||||
Scenario: Alice creates a folder via Graph api and uploads a file
|
||||
Given user "Alice" has created a space "Project Moon" of type "project" with quota "2000"
|
||||
Scenario: A user can create a folder and upload a file to a Space
|
||||
Given user "Alice" has created a space "Project Moon" of type "project" with quota "2000"
|
||||
When user "Alice" creates a folder "NewFolder" in space "Project Moon" using the WebDav Api
|
||||
Then the HTTP status code should be "201"
|
||||
And user "Alice" uploads a file inside space "Project Moon" with content "Test" to "test.txt" using the WebDAV API
|
||||
@@ -35,14 +35,14 @@ Feature: Upload files into a space
|
||||
| NewFolder |
|
||||
| test.txt |
|
||||
|
||||
Scenario: Bob uploads a file via the Graph api in a space, he expects a 404 code and Alice checks that this file does not exist
|
||||
Given user "Alice" has created a space "Project Pluto" of type "project" with quota "2000"
|
||||
Scenario: A user cannot upload a file in a Space if they do not have permission
|
||||
Given user "Alice" has created a space "Project Pluto" of type "project" with quota "2000"
|
||||
When user "Bob" uploads a file inside space "Project Pluto" owned by the user "Alice" with content "Test" to "test.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "404"
|
||||
And for user "Alice" the space "Project Pluto" should not contain these entries:
|
||||
| test.txt |
|
||||
|
||||
Scenario: Alice creates uploads a file and checks her quota
|
||||
Scenario: A user can upload a file in a Space and see the remaining quota
|
||||
When user "Alice" creates a space "Project Saturn" of type "project" with quota "2000" using the GraphApi
|
||||
And the json responded should contain a space "Project Saturn" with these key and value pairs:
|
||||
| key | value |
|
||||
|
||||
Reference in New Issue
Block a user