From d13088c90969cad408ed4c3da254a5f16f888d06 Mon Sep 17 00:00:00 2001 From: Sabin Panta <64484313+S-Panta@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:29:23 +0545 Subject: [PATCH] added test for enable disable share shared by project space to group (#8796) --- .../enableDisableShareSync.feature | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/tests/acceptance/features/apiSharingNg/enableDisableShareSync.feature b/tests/acceptance/features/apiSharingNg/enableDisableShareSync.feature index af20d5282..fe2badcc1 100644 --- a/tests/acceptance/features/apiSharingNg/enableDisableShareSync.feature +++ b/tests/acceptance/features/apiSharingNg/enableDisableShareSync.feature @@ -229,3 +229,69 @@ Feature: enable or disable sync of incoming shares | resource | | textfile0.txt | | FolderToShare | + + + Scenario Outline: enable a group share sync shared from Project Space by only one user in a group + Given user "Carol" has been created with default attributes and without skeleton files + And the administrator has assigned the role "Space Admin" to user "Carol" using the Graph API + And group "grp1" has been created + And user "Alice" has been added to group "grp1" + And user "Brian" has been added to group "grp1" + And user "Alice" has disabled the auto-sync share + And user "Brian" has disabled the auto-sync share + And user "Carol" has created a space "NewSpace" with the default quota using the Graph API + And user "Carol" has created a folder "FolderToShare" in space "NewSpace" + And user "Carol" has uploaded a file inside space "NewSpace" with content "hello world" to "/textfile0.txt" + And user "Carol" has sent the following share invitation: + | resource | | + | space | NewSpace | + | sharee | grp1 | + | shareType | group | + | permissionsRole | Viewer | + When user "Alice" enables sync of share "" offered by "Carol" from "NewSpace" space using the Graph API + Then the HTTP status code should be "201" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "@client.synchronize" + ], + "properties": { + "@client.synchronize": { + "const": true + } + } + } + """ + And user "Alice" should have sync enabled for share "" + And user "Brian" should have sync disabled for share "" + Examples: + | resource | + | textfile0.txt | + | FolderToShare | + + + Scenario Outline: disable group share sync shared from Project space by only one user in a group + Given user "Carol" has been created with default attributes and without skeleton files + And the administrator has assigned the role "Space Admin" to user "Carol" using the Graph API + And group "grp1" has been created + And user "Alice" has been added to group "grp1" + And user "Brian" has been added to group "grp1" + And user "Carol" has created a space "NewSpace" with the default quota using the Graph API + And user "Carol" has created a folder "FolderToShare" in space "NewSpace" + And user "Carol" has uploaded a file inside space "NewSpace" with content "hello world" to "/textfile0.txt" + And user "Carol" has sent the following share invitation: + | resource | | + | space | NewSpace | + | sharee | grp1 | + | shareType | group | + | permissionsRole | Viewer | + When user "Alice" disables sync of share "" using the Graph API + Then the HTTP status code should be "200" + And user "Alice" should have sync disabled for share "" + And user "Brian" should have sync enabled for share "" + Examples: + | resource | + | textfile0.txt | + | FolderToShare |