add Given form for steps
This commit is contained in:
@@ -8,12 +8,11 @@ Feature: Change data of space
|
||||
|
||||
Background:
|
||||
Given user "Alice" has been created with default attributes and without skeleton files
|
||||
And the administrator gives "Alice" the role "Admin" using the settings api
|
||||
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 204 code and checks that the space name has changed
|
||||
When user "Alice" creates a space "Project Jupiter" of type "project" with quota "20" using the GraphApi
|
||||
And user "Alice" lists all available spaces via the GraphApi
|
||||
And user "Alice" changes the name of the "Project Jupiter" space to "Project Death Star"
|
||||
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 "204"
|
||||
When user "Alice" lists all available spaces via the GraphApi
|
||||
Then the json responded should contain a space "Project Death Star" with these key and value pairs:
|
||||
@@ -24,9 +23,8 @@ Feature: Change data of space
|
||||
| root@@@webDavUrl | %base_url%/dav/spaces/%space_id% |
|
||||
|
||||
Scenario: Alice increases quota of the space via the Graph api, she expects a 204 code and checks that the quota has changed
|
||||
When user "Alice" creates a space "Project Earth" of type "project" with quota "20" using the GraphApi
|
||||
And user "Alice" lists all available spaces via the GraphApi
|
||||
And user "Alice" changes the quota of the "Project Earth" space to "100"
|
||||
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 "204"
|
||||
When user "Alice" lists all available spaces via the GraphApi
|
||||
Then the json responded should contain a space "Project Earth" with these key and value pairs:
|
||||
|
||||
@@ -30,7 +30,7 @@ Feature: List and create spaces
|
||||
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
|
||||
Given the administrator gives "Alice" the role "Admin" using the settings api
|
||||
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"
|
||||
And the json responded should contain a space "Project Mars" with these key and value pairs:
|
||||
@@ -45,7 +45,7 @@ Feature: List and create spaces
|
||||
| .space/ |
|
||||
|
||||
Scenario: Alice creates Space via Graph api with certain quota, she expects a 201 code and the correct data in the response
|
||||
Given the administrator gives "Alice" the role "Admin" using the settings api
|
||||
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"
|
||||
And the json responded should contain a space "Project Venus" with these key and value pairs:
|
||||
|
||||
@@ -6,21 +6,19 @@ Feature: State of the quota
|
||||
| 0 - 75% | normal |
|
||||
| 76 - 90% | nearing |
|
||||
| 91 - 99% | critical |
|
||||
| 100 % | exceded |
|
||||
| 100 % | exceeded |
|
||||
|
||||
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
|
||||
|
||||
Background:
|
||||
Given user "Alice" has been created with default attributes and without skeleton files
|
||||
And the administrator gives "Alice" the role "Admin" using the settings api
|
||||
And the administrator has given "Alice" the role "Admin" using the settings api
|
||||
|
||||
|
||||
Scenario Outline: check the quota display
|
||||
When user "Alice" creates a space "<spaceName>" of type "project" with quota "<total>" using the GraphApi
|
||||
And user "Alice" lists all available spaces via the GraphApi
|
||||
And user "Alice" uploads a file inside space "<spaceName>" with content "<fileContent>" to "test.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
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 |
|
||||
@@ -41,35 +39,30 @@ Feature: State of the quota
|
||||
|
||||
|
||||
Scenario: uploading a file with an insufficient quota
|
||||
When user "Alice" creates a space "Project Alfa" of type "project" with quota "10" using the GraphApi
|
||||
And user "Alice" lists all available spaces via the GraphApi
|
||||
And user "Alice" uploads a file inside space "Project Alfa" with content "More than 10 bytes" to "test.txt" using the WebDAV API
|
||||
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
|
||||
When user "Alice" creates a space "Project Beta" of type "project" with quota "7" using the GraphApi
|
||||
And user "Alice" lists all available spaces via the GraphApi
|
||||
And user "Alice" uploads a file inside space "Project Alfa" with content "7 bytes" to "test.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
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"
|
||||
And for user "Alice" the space "Project Beta" should contain these entries:
|
||||
| NewFolder |
|
||||
|
||||
|
||||
Scenario: overwriting a file with an enough quota
|
||||
When user "Alice" creates a space "Project Gamma" of type "project" with quota "10" using the GraphApi
|
||||
And user "Alice" lists all available spaces via the GraphApi
|
||||
And user "Alice" uploads a file inside space "Project Gamma" with content "7 bytes" to "test.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And user "Alice" uploads a file inside space "Project Gamma" with content "0010 bytes" to "test.txt" using the WebDAV API
|
||||
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" creates a space "Project Delta" of type "project" with quota "10" using the GraphApi
|
||||
And user "Alice" lists all available spaces via the GraphApi
|
||||
And user "Alice" uploads a file inside space "Project Delta" with content "7 bytes" to "test.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And user "Alice" uploads a file inside space "Project Delta" with content "00011 bytes" to "test.txt" using the WebDAV API
|
||||
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"
|
||||
|
||||
@@ -9,30 +9,25 @@ Feature: Upload files into a space
|
||||
Background:
|
||||
Given user "Alice" has been created with default attributes and without skeleton files
|
||||
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 the administrator gives "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
|
||||
And user "Alice" lists all available spaces via the GraphApi
|
||||
And user "Alice" creates a folder "mainFolder" in space "Project Venus" using the WebDav Api
|
||||
Given user "Alice" has created a space "Project Venus" of type "project" with quota "2000"
|
||||
When user "Alice" creates a folder "mainFolder" in space "Project Venus" using the WebDav Api
|
||||
Then the HTTP status code should be "201"
|
||||
And for user "Alice" the space "Project Venus" 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
|
||||
Given the administrator gives "Alice" the role "Admin" using the settings api
|
||||
When user "Alice" creates a space "Project Merkur" of type "project" with quota "2000" using the GraphApi
|
||||
And user "Alice" lists all available spaces via the GraphApi
|
||||
And user "Bob" creates a folder "forAlice" in space "Project Merkur" using the WebDav Api
|
||||
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 the administrator gives "Alice" the role "Admin" using the settings api
|
||||
When user "Alice" creates a space "Project Moon" of type "project" with quota "2000" using the GraphApi
|
||||
And user "Alice" lists all available spaces via the GraphApi
|
||||
And user "Alice" creates a folder "NewFolder" in space "Project Moon" using the WebDav Api
|
||||
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
|
||||
Then the HTTP status code should be "201"
|
||||
@@ -41,16 +36,13 @@ Feature: Upload files into a space
|
||||
| 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 the administrator gives "Alice" the role "Admin" using the settings api
|
||||
When user "Alice" creates a space "Project Pluto" of type "project" with quota "2000" using the GraphApi
|
||||
And user "Alice" lists all available spaces via the GraphApi
|
||||
And user "Bob" uploads a file inside space "Project Pluto" with content "Test" to "test.txt" using the WebDAV API
|
||||
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
|
||||
Given the administrator gives "Alice" the role "Admin" using the settings api
|
||||
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 |
|
||||
@@ -58,13 +50,12 @@ Feature: Upload files into a space
|
||||
| id | %space_id% |
|
||||
| name | Project Saturn|
|
||||
| quota@@@total | 2000 |
|
||||
And user "Alice" lists all available spaces via the GraphApi
|
||||
And user "Alice" uploads a file inside space "Project Saturn" with content "Test" to "test.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And for user "Alice" the space "Project Saturn" should contain these entries:
|
||||
| test.txt |
|
||||
And user "Alice" lists all available spaces via the GraphApi
|
||||
And the json responded should contain a space "Project Saturn" with these key and value pairs:
|
||||
When user "Alice" lists all available spaces via the GraphApi
|
||||
Then the json responded should contain a space "Project Saturn" with these key and value pairs:
|
||||
| key | value |
|
||||
| driveType | project |
|
||||
| id | %space_id% |
|
||||
|
||||
Reference in New Issue
Block a user