From 44a46faae048763740e87feaf8eb54e852be08cb Mon Sep 17 00:00:00 2001 From: Prajwol Amatya <83579989+PrajwolAmatya@users.noreply.github.com> Date: Thu, 24 Sep 2026 12:15:08 +0545 Subject: [PATCH] [tests-only][full-ci] test: non-admin user get the detail of group along with group members (#12981) test: non-admin user get the detail of group Signed-off-by: Prajwol Amatya --- ...ected-failures-localAPI-on-OCIS-storage.md | 11 ---- .../features/apiGraphGroup/getGroup.feature | 52 +++++++++---------- 2 files changed, 25 insertions(+), 38 deletions(-) diff --git a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md index 6d88736d0c6..b36373b4923 100644 --- a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md @@ -55,17 +55,6 @@ The expected failures in this file are from features in the owncloud/ocis repo. - [apiGraphUser/getUser.feature:389](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUser/getUser.feature#L389) - [apiGraphUser/getUser.feature:390](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUser/getUser.feature#L390) -#### [Normal user can get expanded members information of a group](https://github.com/owncloud/ocis/issues/5604) - -- [apiGraphGroup/getGroup.feature:399](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphGroup/getGroup.feature#L399) -- [apiGraphGroup/getGroup.feature:400](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphGroup/getGroup.feature#L400) -- [apiGraphGroup/getGroup.feature:401](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphGroup/getGroup.feature#L401) -- [apiGraphGroup/getGroup.feature:460](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphGroup/getGroup.feature#L460) -- [apiGraphGroup/getGroup.feature:461](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphGroup/getGroup.feature#L461) -- [apiGraphGroup/getGroup.feature:462](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphGroup/getGroup.feature#L462) -- [apiGraphGroup/getGroup.feature:508](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphGroup/getGroup.feature#L508) -- [apiGraphGroup/getGroup.feature:509](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphGroup/getGroup.feature#L509) -- [apiGraphGroup/getGroup.feature:510](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphGroup/getGroup.feature#L510) #### [Same users can be added in a group multiple time](https://github.com/owncloud/ocis/issues/5702) diff --git a/tests/acceptance/features/apiGraphGroup/getGroup.feature b/tests/acceptance/features/apiGraphGroup/getGroup.feature index 47b56f2338b..df58d8b7e20 100644 --- a/tests/acceptance/features/apiGraphGroup/getGroup.feature +++ b/tests/acceptance/features/apiGraphGroup/getGroup.feature @@ -370,27 +370,26 @@ Feature: get groups and their members And user "Alice" has been added to group "tea-lover" And user "Brian" has been added to group "tea-lover" When user "Brian" gets all the members information of group "tea-lover" using the Graph API - Then the HTTP status code should be "403" + Then the HTTP status code should be "200" And the JSON data of the response should match """ { "type": "object", "required": [ - "error" + "displayName", + "id" ], "properties": { - "error": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string", - "enum": ["Forbidden"] - } - } + "displayName": { + "const": "tea-lover" + }, + "id": { + "type": "string", + "pattern": "^%group_id_pattern%$" } + }, + "not": { + "required": ["members"] } } """ @@ -431,27 +430,26 @@ Feature: get groups and their members Given group "tea-lover" has been created And the administrator has assigned the role "" to user "Alice" using the Graph API When user "Alice" gets details of the group "tea-lover" using the Graph API - Then the HTTP status code should be "403" + Then the HTTP status code should be "200" And the JSON data of the response should match """ { "type": "object", "required": [ - "error" + "displayName", + "id" ], "properties": { - "error": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string", - "enum": ["Forbidden"] - } - } + "displayName": { + "const": "tea-lover" + }, + "id": { + "type": "string", + "pattern": "^%group_id_pattern%$" } + }, + "not": { + "required": ["members"] } } """ @@ -502,7 +500,7 @@ Feature: get groups and their members Scenario Outline: non-admin user tries to get group information of non-existing group Given the administrator has assigned the role "" to user "Alice" using the Graph API When user "Alice" gets details of the group "non-existing" using the Graph API - Then the HTTP status code should be "403" + Then the HTTP status code should be "404" Examples: | user-role | | Space Admin |