diff --git a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md index c859b491a20..1eabd2cf62d 100644 --- a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md @@ -44,7 +44,7 @@ The expected failures in this file are from features in the owncloud/ocis repo. - [apiSpacesShares/copySpaces.feature:793](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/copySpaces.feature#L793) ### [Creating group with empty name returns status code 200](https://github.com/owncloud/ocis/issues/5050) -- [apiGraph/createGroup.feature:60](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/createGroup.feature#L60) +- [apiGraph/createGroup.feature:46](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/createGroup.feature#L46) ### [Settings service user can list other peoples assignments](https://github.com/owncloud/ocis/issues/5032) - [apiAccountsHashDifficulty/assignRole.feature:27](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiAccountsHashDifficulty/assignRole.feature#L27) @@ -69,9 +69,6 @@ The expected failures in this file are from features in the owncloud/ocis repo. - [apiGraph/editGroup.feature:24](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/editGroup.feature#L24) - [apiGraph/editGroup.feature:25](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/editGroup.feature#L25) - [apiGraph/editGroup.feature:40](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/editGroup.feature#L40) -- [apiGraph/editGroup.feature:53](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/editGroup.feature#L53) -- [apiGraph/editGroup.feature:54](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/editGroup.feature#L54) -- [apiGraph/editGroup.feature:55](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/editGroup.feature#L55) #### [CORS headers are not identical with oC10 headers](https://github.com/owncloud/ocis/issues/5195) - [apiCors/cors.feature:25](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiCors/cors.feature#L25) @@ -124,9 +121,6 @@ The expected failures in this file are from features in the owncloud/ocis repo. #### [Sharing to a group with an expiration date does not work #5442](https://github.com/owncloud/ocis/issues/5442) - [apiSpacesShares/shareSubItemOfSpace.feature:105](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/shareSubItemOfSpace.feature#L105) -#### [Space admin should not be able to change the user quota](https://github.com/owncloud/ocis/issues/5475) -- [apiSpaces/spaceManagement.feature:149](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/spaceManagement.feature#L149) - #### [Normal user can get expanded members information of a group](https://github.com/owncloud/ocis/issues/5604) - [apiGraph/getGroup.feature:130](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/getGroup.feature#L130) - [apiGraph/getGroup.feature:131](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/getGroup.feature#L131) @@ -139,10 +133,10 @@ The expected failures in this file are from features in the owncloud/ocis repo. - [apiGraph/editUser.feature:44](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/editUser.feature#L44) #### [Same users can be added in a group multiple time](https://github.com/owncloud/ocis/issues/5702) -- [apiGraph/addUserToGroup.feature:245](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/addUserToGroup.feature#L245) +- [apiGraph/addUserToGroup.feature:246](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/addUserToGroup.feature#L245) #### [Try to add group to a group return 204](https://github.com/owncloud/ocis/issues/5793) -- [apiGraph/addUserToGroup.feature:267](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/addUserToGroup.feature#L267) +- [apiGraph/addUserToGroup.feature:268](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/addUserToGroup.feature#L267) ### [Users are added in a group with wrong host in host-part of user](https://github.com/owncloud/ocis/issues/5871) - [apiGraph/addUserToGroup.feature:292](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/addUserToGroup.feature#L292) diff --git a/tests/acceptance/features/apiGraph/addUserToGroup.feature b/tests/acceptance/features/apiGraph/addUserToGroup.feature index f43481e9d9d..bea833ac57b 100644 --- a/tests/acceptance/features/apiGraph/addUserToGroup.feature +++ b/tests/acceptance/features/apiGraph/addUserToGroup.feature @@ -120,7 +120,7 @@ Feature: add users to group | Alice | var/../etc | - Scenario Outline: normal user tries to add himself to a group + Scenario Outline: user other than the admin tries to add himself to a group Given the administrator has given "Alice" the role "" using the settings api And group "groupA" has been created When user "Alice" tries to add himself to group "groupA" using the Graph API @@ -133,7 +133,7 @@ Feature: add users to group | Guest | - Scenario Outline: normal user tries to add other user to a group + Scenario Outline: user other than the admin tries to add other user to a group Given user "Brian" has been created with default attributes and without skeleton files And the administrator has given "Brian" the role "" using the settings api And group "groupA" has been created @@ -152,10 +152,11 @@ Feature: add users to group Then the HTTP status code should be "404" - Scenario Outline: normal user tries to add user to a non-existing group - Given the administrator has given "Alice" the role "" using the settings api - When the administrator tries to add user "Alice" to a nonexistent group using the Graph API - Then the HTTP status code should be "404" + Scenario Outline: user other than the admin tries to add user to a nonexistent group + Given user "Brian" has been created with default attributes and without skeleton files + And the administrator has given "Alice" the role "" using the settings api + When the user "Alice" tries to add user "Brian" to a nonexistent group using the Graph API + Then the HTTP status code should be "401" Examples: | role | | Space Admin | diff --git a/tests/acceptance/features/apiGraph/createGroup.feature b/tests/acceptance/features/apiGraph/createGroup.feature index 08058f97d87..2102592dc9d 100644 --- a/tests/acceptance/features/apiGraph/createGroup.feature +++ b/tests/acceptance/features/apiGraph/createGroup.feature @@ -30,7 +30,7 @@ Feature: create group And group "mygroup" should exist - Scenario Outline: normal user tries to create a group + Scenario Outline: user other than the admin can't create a group Given user "Brian" has been created with default attributes and without skeleton files And the administrator has given "Brian" the role "" using the settings api When user "Brian" tries to create a group "mygroup" using the Graph API @@ -42,32 +42,7 @@ Feature: create group | User | | Guest | - - Scenario Outline: normal user tries to create a group that already exists - Given group "mygroup" has been created - And user "Brian" has been created with default attributes and without skeleton files - And the administrator has given "Brian" the role "" using the settings api - When user "Brian" tries to create a group "mygroup" using the Graph API - And the HTTP status code should be "401" - And group "mygroup" should exist - Examples: - | userRole | - | Space Admin | - | User | - | Guest | - @issue-5050 Scenario: admin user tries to create a group that is the empty string When user "Alice" tries to create a group "" using the Graph API Then the HTTP status code should be "400" - - - Scenario Outline: normal user tries to create a group that is the empty string - Given the administrator has given "Alice" the role "" using the settings api - When user "Alice" tries to create a group "" using the Graph API - Then the HTTP status code should be "401" - Examples: - | userRole | - | Space Admin | - | User | - | Guest | diff --git a/tests/acceptance/features/apiGraph/deleteGroup.feature b/tests/acceptance/features/apiGraph/deleteGroup.feature index 22d105e411f..e5a5c799187 100644 --- a/tests/acceptance/features/apiGraph/deleteGroup.feature +++ b/tests/acceptance/features/apiGraph/deleteGroup.feature @@ -51,7 +51,7 @@ Feature: delete groups | 50%2Fix | %2F literal looks like an escaped slash | - Scenario Outline: normal user tries to delete a group + Scenario Outline: user other than the admin can't delete a group Given user "Brian" has been created with default attributes and without skeleton files And the administrator has given "Brian" the role "" using the settings api And group "new-group" has been created diff --git a/tests/acceptance/features/apiGraph/editGroup.feature b/tests/acceptance/features/apiGraph/editGroup.feature index fda831a6c9b..534fb4f39ab 100644 --- a/tests/acceptance/features/apiGraph/editGroup.feature +++ b/tests/acceptance/features/apiGraph/editGroup.feature @@ -25,7 +25,7 @@ Feature: edit group name | grp1 | 50%pass | - Scenario Outline: normal user tries to rename a group + Scenario Outline: user other than the admin can't rename a group Given the administrator has given "Alice" the role "" using the settings api And group "grp1" has been created When user "Alice" tries to rename group "grp1" to "grp101" using the Graph API @@ -37,19 +37,7 @@ Feature: edit group name | Guest | - Scenario: admin user tries to rename non-existent group - When user "Alice" tries to rename non-existent group to "grp1" using the Graph API + Scenario: admin user tries to rename nonexistent group + When user "Alice" tries to rename a nonexistent group to "grp1" using the Graph API Then the HTTP status code should be "404" And group "grp1" should not exist - - - Scenario Outline: normal user tries to rename non-existent group - Given the administrator has given "Alice" the role "" using the settings api - When user "Alice" tries to rename non-existent group to "grp1" using the Graph API - Then the HTTP status code should be "404" - And group "grp1" should not exist - Examples: - | role | - | Space Admin | - | User | - | Guest | diff --git a/tests/acceptance/features/apiGraph/getGroup.feature b/tests/acceptance/features/apiGraph/getGroup.feature index bee018d72ee..8a0c3f05a3a 100644 --- a/tests/acceptance/features/apiGraph/getGroup.feature +++ b/tests/acceptance/features/apiGraph/getGroup.feature @@ -21,7 +21,7 @@ Feature: get groups and their members | h2o-lover | - Scenario Outline: normal user cannot get the groups list + Scenario Outline: user other than the admin shouldn't get the groups list Given user "Brian" has been created with default attributes and without skeleton files And the administrator has given "Brian" the role "" using the settings api And group "tea-lover" has been created @@ -52,7 +52,7 @@ Feature: get groups and their members | Carol | - Scenario Outline: normal user tries to get users of a group + Scenario Outline: user other than the admin shouldn't get users of a group Given user "Brian" has been created with default attributes and without skeleton files And the administrator has given "Brian" the role "" using the settings api And group "tea-lover" has been created @@ -87,7 +87,7 @@ Feature: get groups and their members | Carol King | %uuid_v4% | carol@example.org | Carol | - Scenario Outline: normal user gets all groups along with their members information + Scenario Outline: user other than the admin shouldn't get all groups along with its member's information Given user "Brian" has been created with default attributes and without skeleton files And the administrator has given "Brian" the role "" using the settings api And group "tea-lover" has been created @@ -104,7 +104,7 @@ Feature: get groups and their members | Guest | - Scenario: admin user gets a group along with their members information + Scenario: admin user gets a group along with its member's information Given user "Brian" has been created with default attributes and without skeleton files And group "tea-lover" has been created And user "Alice" has been added to group "tea-lover" @@ -116,7 +116,7 @@ Feature: get groups and their members | Brian Murphy | %uuid_v4% | brian@example.org | Brian | @issue-5604 - Scenario Outline: normal user gets a group along with their members information + Scenario Outline: user other than the admin gets a group along with its member's information Given user "Brian" has been created with default attributes and without skeleton files And the administrator has given "Brian" the role "" using the settings api And group "tea-lover" has been created diff --git a/tests/acceptance/features/apiGraph/removeUserFromGroup.feature b/tests/acceptance/features/apiGraph/removeUserFromGroup.feature index 5e7d42bbbaa..c623460dd40 100644 --- a/tests/acceptance/features/apiGraph/removeUserFromGroup.feature +++ b/tests/acceptance/features/apiGraph/removeUserFromGroup.feature @@ -157,7 +157,7 @@ Feature: remove a user from a group Then the HTTP status code should be "404" - Scenario Outline: normal user tries to remove a user in their group + Scenario Outline: user other than the admin can't remove a user from their group Given user "Brian" has been created with default attributes and without skeleton files And the administrator has given "Brian" the role "" using the settings api And group "grp1" has been created diff --git a/tests/acceptance/features/bootstrap/GraphContext.php b/tests/acceptance/features/bootstrap/GraphContext.php index 34528af34f0..56622a08811 100644 --- a/tests/acceptance/features/bootstrap/GraphContext.php +++ b/tests/acceptance/features/bootstrap/GraphContext.php @@ -1329,7 +1329,7 @@ public function userRenamesGroupUsingTheGraphApi(string $user, string $oldGroup, } /** - * @When user :user tries to rename non-existent group to :newGroup using the Graph API + * @When user :user tries to rename a nonexistent group to :newGroup using the Graph API * * @param string $user * @param string $newGroup @@ -1338,7 +1338,7 @@ public function userRenamesGroupUsingTheGraphApi(string $user, string $oldGroup, * @throws GuzzleException * @throws Exception */ - public function userTriesToRenamesGroupNonExistentGroupToUsingTheGraphApi(string $user, string $newGroup): void { + public function userTriesToRenameNonExistentGroupToNewGroupName(string $user, string $newGroup): void { $oldGroupId = WebDavHelper::generateUUIDv4(); $this->featureContext->setResponse($this->renameGroup($oldGroupId, $newGroup, $user)); }