From e3266d00980682d659ee7db924af9c1a32241610 Mon Sep 17 00:00:00 2001 From: prashant-gurung899 Date: Wed, 27 Nov 2024 12:51:20 +0545 Subject: [PATCH] add tests to remove access of shared resource to federated user Signed-off-by: prashant-gurung899 --- .../acceptance/features/apiOcm/share.feature | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/tests/acceptance/features/apiOcm/share.feature b/tests/acceptance/features/apiOcm/share.feature index 0aacfeb0d8e..f2c392664a8 100755 --- a/tests/acceptance/features/apiOcm/share.feature +++ b/tests/acceptance/features/apiOcm/share.feature @@ -753,3 +753,75 @@ Feature: an user shares resources using ScienceMesh application Then the HTTP status code should be "200" And the downloaded image should be "32" pixels wide and "32" pixels high And the downloaded preview content should match with "thumbnail.png" fixtures preview content + + @issue-10213 + Scenario: local user deletes access of shared resource to federated user + Given using spaces DAV path + And using server "REMOTE" + And "Brian" has created the federation share invitation + And using server "LOCAL" + And "Alice" has accepted invitation + And user "Alice" has created a folder "FOLDER" in space "Personal" + And user "Alice" has sent the following resource share invitation to federated user: + | resource | FOLDER | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | + When user "Alice" removes the access of user "Brian" from resource "FOLDER" of space "Personal" using the Graph API + Then the HTTP status code should be "204" + When using server "REMOTE" + And user "Brian" lists the shares shared with him without retry using the Graph API + Then the HTTP status code should be "200" + And the JSON data of the response should not contain resource "FOLDER" with the following data: + """ + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "minItems": 0, + "maxItems": 0, + } + } + } + """ + + @issue-10213 + Scenario: federation user deletes access of shared resource to local user + Given using spaces DAV path + And using server "LOCAL" + And "Alice" has created the federation share invitation + And using server "REMOTE" + And "Brian" has accepted invitation + And user "Brian" has created a folder "FOLDER" in space "Personal" + And user "Brian" has sent the following resource share invitation to federated user: + | resource | FOLDER | + | space | Personal | + | sharee | Alice | + | shareType | user | + | permissionsRole | Editor | + When user "Brian" removes the access of user "Alice" from resource "FOLDER" of space "Personal" using the Graph API + Then the HTTP status code should be "204" + When using server "LOCAL" + And user "Alice" lists the shares shared with her without retry using the Graph API + Then the HTTP status code should be "200" + And the JSON data of the response should not contain resource "FOLDER" with the following data: + """ + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "minItems": 0, + "maxItems": 0, + } + } + } + """