diff --git a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md index 9ee1489d34d..bf0d9d26717 100644 --- a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md @@ -142,5 +142,9 @@ The expected failures in this file are from features in the owncloud/ocis repo. #### [Admin user can't restore other user spaces](https://github.com/owncloud/ocis/issues/5872) - [apiSpaces/restoreSpaces.feature:94](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/restoreSpaces.feature#L94) +#### [https://github.com/owncloud/ocis/issues/5938](https://github.com/owncloud/ocis/issues/5938) +- [apiSpaces/createSpace.feature:18](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/createSpace.feature#L18) +- [apiSpaces/createSpace.feature:19](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/createSpace.feature#L19) + Note: always have an empty line at the end of this file. The bash script that processes this file requires that the last line has a newline on the end. diff --git a/tests/acceptance/features/apiSpaces/createSpace.feature b/tests/acceptance/features/apiSpaces/createSpace.feature index 84b6af33e5e..81b5ec9bf0b 100644 --- a/tests/acceptance/features/apiSpaces/createSpace.feature +++ b/tests/acceptance/features/apiSpaces/createSpace.feature @@ -1,15 +1,17 @@ @api Feature: create space - Only user with admin and SpaceAdmin permissions can create new spaces + As an admin and space admin + I want to create new spaces + So that I can organize a set of resources in a hierarchical tree Background: Given user "Alice" has been created with default attributes and without skeleton files - Scenario Outline: The user without permissions to create space cannot create a Space via Graph API + Scenario Outline: user with role user and guest can't create Space via Graph API Given the administrator has given "Alice" the role "" 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 "401" + When user "Alice" tries to create a space "Project Mars" of type "project" with the default quota using the Graph API + Then the HTTP status code should be "403" And the user "Alice" should not have a space called "share space" Examples: | role | @@ -17,9 +19,9 @@ Feature: create space | Guest | - Scenario Outline: An admin or space admin user can create a Space via the Graph API with default quota + Scenario Outline: an admin or space admin user can create a Space via the Graph API with a default quota Given the administrator has given "Alice" the role "" using the settings api - When user "Alice" creates a space "Project Mars" of type "project" with the default quota using the GraphApi + When user "Alice" creates a space "Project Mars" of type "project" with the default quota using the Graph API Then the HTTP status code should be "201" And the JSON response should contain space called "Project Mars" and match """ @@ -88,9 +90,9 @@ Feature: create space | Space Admin | - Scenario Outline: An admin or space admin user can create a Space via the Graph API with certain quota + Scenario Outline: an admin or space admin user can create a Space via the Graph API with certain quota Given the administrator has given "Alice" the role "" using the settings api - When user "Alice" creates a space "Project Venus" of type "project" with quota "2000" using the GraphApi + When user "Alice" creates a space "Project Venus" of type "project" with quota "2000" using the Graph API Then the HTTP status code should be "201" And the JSON response should contain space called "Project Venus" and match """ diff --git a/tests/acceptance/features/apiSpaces/disableAndDeleteSpaces.feature b/tests/acceptance/features/apiSpaces/disableAndDeleteSpaces.feature index af96f2dbfb2..63108b8ade3 100644 --- a/tests/acceptance/features/apiSpaces/disableAndDeleteSpaces.feature +++ b/tests/acceptance/features/apiSpaces/disableAndDeleteSpaces.feature @@ -2,7 +2,7 @@ Feature: Disabling and deleting space As a manager of space I want to be able to disable the space first, then delete it. - I want to make sure that a disabled spaces isn't accessible by shared users. + So that a disabled spaces isn't accessible by shared users. 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 @@ -24,7 +24,7 @@ Feature: Disabling and deleting space | role | viewer | - Scenario Outline: user can disable their own Space via the Graph API + Scenario Outline: user can disable their own space via the Graph API Given the administrator has given "Alice" the role "" using the settings api When user "Alice" disables a space "Project Moon" Then the HTTP status code should be "204" @@ -74,7 +74,7 @@ Feature: Disabling and deleting space | Guest | - Scenario Outline: User with role User and Guest cannot disable others Space via the Graph API + Scenario Outline: user with role user and guest cannot disable other space via the Graph API Given the administrator has given "Carol" the role "" using the settings api When user "Carol" tries to disable a space "Project Moon" owned by user "Alice" Then the HTTP status code should be "403" @@ -114,7 +114,7 @@ Feature: Disabling and deleting space | Guest | - Scenario: An space manager can disable and delete Space in which files and folders exist via the webDav API + Scenario: a space manager can disable and delete space in which files and folders exist via the webDav API Given user "Alice" has uploaded a file inside space "Project Moon" with content "test" to "test.txt" And user "Alice" has created a folder "MainFolder" in space "Project Moon" When user "Alice" disables a space "Project Moon" @@ -151,7 +151,7 @@ Feature: Disabling and deleting space | Guest | - Scenario Outline: user can delete their own disabled Space via the Graph API + Scenario Outline: user can delete their own disabled space via the Graph API Given the administrator has given "Alice" the role "" using the settings api And user "Alice" has disabled a space "Project Moon" When user "Alice" deletes a space "Project Moon" @@ -165,7 +165,7 @@ Feature: Disabling and deleting space | Guest | - Scenario Outline: Admin and Space manager can disable others Space via the Graph API + Scenario Outline: an admin and space manager can disable other space via the Graph API Given the administrator has given "Carol" the role "" using the settings api When user "Carol" tries to disable a space "Project Moon" owned by user "Alice" Then the HTTP status code should be "204" @@ -211,7 +211,7 @@ Feature: Disabling and deleting space | Space Admin | - Scenario Outline: Admin and Space manager can delete others disabled Space + Scenario Outline: an admin and space manager can delete other disabled Space Given the administrator has given "Carol" the role "" using the settings api And user "Alice" has disabled a space "Project Moon" When user "Carol" tries to delete a space "Project Moon" owned by user "Alice" @@ -223,7 +223,7 @@ Feature: Disabling and deleting space | Space Admin | - Scenario Outline: User with role User and Guest cannot delete others disabled Space via the Graph API + Scenario Outline: user with role user and guest cannot delete others disabled Space via the Graph API Given the administrator has given "Carol" the role "" using the settings api And user "Alice" has disabled a space "Project Moon" When user "Carol" tries to delete a space "Project Moon" owned by user "Alice" diff --git a/tests/acceptance/features/apiSpaces/listSpaces.feature b/tests/acceptance/features/apiSpaces/listSpaces.feature index 649563004ff..ecf6c528b6b 100644 --- a/tests/acceptance/features/apiSpaces/listSpaces.feature +++ b/tests/acceptance/features/apiSpaces/listSpaces.feature @@ -314,7 +314,7 @@ Feature: List and create spaces Scenario Outline: A user can list his created spaces via multiple endpoints Given the administrator has given "Alice" the role "" using the settings api - When user "Alice" creates a space "Project Venus" of type "project" with quota "2000" using the GraphApi + When user "Alice" creates a space "Project Venus" of type "project" with quota "2000" using the Graph API Then the HTTP status code should be "201" And the JSON response should contain space called "Project Venus" and match """ diff --git a/tests/acceptance/features/apiSpaces/restoreSpaces.feature b/tests/acceptance/features/apiSpaces/restoreSpaces.feature index d42a107f002..94b78f4ed56 100644 --- a/tests/acceptance/features/apiSpaces/restoreSpaces.feature +++ b/tests/acceptance/features/apiSpaces/restoreSpaces.feature @@ -47,7 +47,7 @@ Feature: Restoring space | mainFolder | - Scenario: Participant can create data in the space after restoring + Scenario: participant can create data in the space after restoring Given user "Alice" has shared a space "restore a space" with settings: | shareWith | Brian | | role | editor | @@ -60,7 +60,7 @@ Feature: Restoring space | mainFolder | - Scenario Outline: User without space manager role cannot restore space + Scenario Outline: user without space manager role cannot restore space Given user "Alice" has shared a space "restore a space" with settings: | shareWith | Brian | | role | | @@ -73,7 +73,7 @@ Feature: Restoring space | editor | - Scenario Outline: User with role User and Guest cannot restore space + Scenario Outline: user with role user and guest cannot restore space Given the administrator has given "Brian" the role "" using the settings api And user "Alice" has disabled a space "restore a space" When user "Brian" tries to restore a disabled space "restore a space" owned by user "Alice" @@ -84,10 +84,10 @@ Feature: Restoring space | Guest | @issue-5872 - Scenario Outline: Admin and Space Admin can restore others space + Scenario Outline: admin and space admin can restore other space Given the administrator has given "Brian" the role "" using the settings api And user "Alice" has disabled a space "restore a space" - When user "Brian" tries to restore a disabled space "restore a space" owned by user "Alice" + When user "Brian" restores a disabled space "restore a space" owned by user "Alice" Then the HTTP status code should be "200" Examples: | role | diff --git a/tests/acceptance/features/bootstrap/SpacesContext.php b/tests/acceptance/features/bootstrap/SpacesContext.php index 1ebbb46d462..8d3d086c7f4 100644 --- a/tests/acceptance/features/bootstrap/SpacesContext.php +++ b/tests/acceptance/features/bootstrap/SpacesContext.php @@ -627,7 +627,7 @@ public function theUserLooksUpTheSingleSpaceUsingTheGraphApiByUsingItsId(string } /** - * @When /^user "([^"]*)" creates a space "([^"]*)" of type "([^"]*)" with the default quota using the GraphApi$/ + * @When /^user "([^"]*)" (?:creates|tries to create) a space "([^"]*)" of type "([^"]*)" with the default quota using the Graph API$/ * * @param string $user * @param string $spaceName @@ -658,7 +658,7 @@ public function theUserCreatesASpaceUsingTheGraphApi( } /** - * @When /^user "([^"]*)" creates a space "([^"]*)" of type "([^"]*)" with quota "([^"]*)" using the GraphApi$/ + * @When /^user "([^"]*)" creates a space "([^"]*)" of type "([^"]*)" with quota "([^"]*)" using the Graph API$/ * * @param string $user * @param string $spaceName