From 5acba455dc4670757487900de2b1ddc3d5c50259 Mon Sep 17 00:00:00 2001 From: Prajwol Amatya <83579989+PrajwolAmatya@users.noreply.github.com> Date: Thu, 25 Apr 2024 18:43:11 +0545 Subject: [PATCH] added test for group user downloading shared resource inside project space when auto sync is disabled (#8945) --- .../getFileByFileId.feature | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/tests/acceptance/features/apiSpacesDavOperation/getFileByFileId.feature b/tests/acceptance/features/apiSpacesDavOperation/getFileByFileId.feature index c1d9afe05e..e600b46435 100644 --- a/tests/acceptance/features/apiSpacesDavOperation/getFileByFileId.feature +++ b/tests/acceptance/features/apiSpacesDavOperation/getFileByFileId.feature @@ -239,3 +239,54 @@ Feature: accessing files using file id | dav-path | | /remote.php/dav/spaces/<> | | /dav/spaces/<> | + + + Scenario Outline: user who is member of group gets content of a shared file in project space when sync is disabled + Given using spaces DAV path + And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "new-space" with the default quota using the Graph API + And user "Brian" has been created with default attributes and without skeleton files + And user "Brian" has disabled the auto-sync share + And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "textfile.txt" + And we save it into "FILEID" + And user "Admin" has created a group "grp1" using the Graph API + And user "Brian" has been added to group "grp1" + And user "Alice" has sent the following share invitation: + | resource | textfile.txt | + | space | new-space | + | sharee | grp1 | + | shareType | group | + | permissionsRole | Viewer | + When user "Brian" sends HTTP method "GET" to URL "" + Then the HTTP status code should be "200" + And the downloaded content should be "some content" + Examples: + | dav-path | + | /remote.php/dav/spaces/<> | + | /dav/spaces/<> | + + + Scenario Outline: user who is member of group gets content of a file from shared folder in project space when sync is disabled + Given using spaces DAV path + And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "new-space" with the default quota using the Graph API + And user "Brian" has been created with default attributes and without skeleton files + And user "Brian" has disabled the auto-sync share + And user "Alice" has created a folder "uploadFolder" in space "new-space" + And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "uploadFolder/textfile.txt" + And we save it into "FILEID" + And user "Admin" has created a group "grp1" using the Graph API + And user "Brian" has been added to group "grp1" + And user "Alice" has sent the following share invitation: + | resource | uploadFolder | + | space | new-space | + | sharee | grp1 | + | shareType | group | + | permissionsRole | Viewer | + When user "Brian" sends HTTP method "GET" to URL "" + Then the HTTP status code should be "200" + And the downloaded content should be "some content" + Examples: + | dav-path | + | /remote.php/dav/spaces/<> | + | /dav/spaces/<> |