From 1e6455ca7cac84c8616408c4cd499ca6d0d6bbb2 Mon Sep 17 00:00:00 2001 From: Prajwol Amatya Date: Wed, 11 Dec 2024 12:22:34 +0545 Subject: [PATCH] added test delete share access after the share role has been disabled --- .../apiSharingNg1/removeAccessToDrive.feature | 16 ++++ .../removeAccessToDriveItem.feature | 80 +++++++++++++++++++ 2 files changed, 96 insertions(+) diff --git a/tests/acceptance/features/apiSharingNg1/removeAccessToDrive.feature b/tests/acceptance/features/apiSharingNg1/removeAccessToDrive.feature index 175edd94c..b843c44a3 100644 --- a/tests/acceptance/features/apiSharingNg1/removeAccessToDrive.feature +++ b/tests/acceptance/features/apiSharingNg1/removeAccessToDrive.feature @@ -246,3 +246,19 @@ Feature: Remove access to a drive When user "Alice" removes the last link share of space "projectSpace" using permissions endpoint of the Graph API Then the HTTP status code should be "204" And user "Alice" should not have any "link" permissions on space "projectSpace" + + @env-config + Scenario: remove space share after the share role Space Editor Without Versions has been disabled + Given using spaces DAV path + And the administrator has enabled the permissions role "Space Editor Without Versions" + 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 "Alice" has sent the following space share invitation: + | space | new-space | + | sharee | Brian | + | shareType | user | + | permissionsRole | Space Editor Without Versions | + And the administrator has disabled the permissions role "Space Editor Without Versions" + When user "Alice" removes the access of user "Brian" from space "new-space" using root endpoint of the Graph API + Then the HTTP status code should be "204" + And the user "Brian" should not have a space called "NewSpace" diff --git a/tests/acceptance/features/apiSharingNg1/removeAccessToDriveItem.feature b/tests/acceptance/features/apiSharingNg1/removeAccessToDriveItem.feature index f7af53004..c1f99ccb4 100644 --- a/tests/acceptance/features/apiSharingNg1/removeAccessToDriveItem.feature +++ b/tests/acceptance/features/apiSharingNg1/removeAccessToDriveItem.feature @@ -143,3 +143,83 @@ Feature: Remove access to a drive item | Space Viewer | | Space Editor | | Manager | + + @env-config + Scenario Outline: remove share after the share role Secure Viewer has been disabled (Personal Space) + Given the administrator has enabled the permissions role "Secure Viewer" + And user "Alice" has uploaded file with content "some content" to "textfile.txt" + And user "Alice" has created folder "folderToShare" + And user "Alice" has sent the following resource share invitation: + | resource | | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Secure Viewer | + And the administrator has disabled the permissions role "Secure Viewer" + When user "Alice" removes the access of user "Brian" from resource "" of space "Personal" using the Graph API + Then the HTTP status code should be "204" + And for user "Brian" the space "Shares" should not contain these entries: + | | + Examples: + | resource | + | textfile.txt | + | folderToShare | + + @env-config + Scenario: remove share after the share role Denied has been disabled (Personal Space) + Given the administrator has enabled the permissions role "Denied" + And user "Alice" has created folder "folderToShare" + And user "Alice" has sent the following resource share invitation: + | resource | folderToShare | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Denied | + And the administrator has disabled the permissions role "Denied" + When user "Alice" removes the access of user "Brian" from resource "folderToShare" of space "Personal" using the Graph API + Then the HTTP status code should be "204" + And for user "Brian" the space "Shares" should not contain these entries: + | folderToShare | + + @env-config + Scenario Outline: remove share after the share role Secure Viewer has been disabled (Project Space) + Given using spaces DAV path + And the administrator has enabled the permissions role "Secure Viewer" + 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 "Alice" has uploaded a file inside space "new-space" with content "some content" to "textfile.txt" + And user "Alice" has created a folder "folderToShare" in space "new-space" + And user "Alice" has sent the following resource share invitation: + | resource | | + | space | new-space | + | sharee | Brian | + | shareType | user | + | permissionsRole | Secure Viewer | + And the administrator has disabled the permissions role "Secure Viewer" + When user "Alice" removes the access of user "Brian" from resource "" of space "new-space" using the Graph API + Then the HTTP status code should be "204" + And for user "Brian" the space "Shares" should not contain these entries: + | | + Examples: + | resource | + | textfile.txt | + | folderToShare | + + @env-config + Scenario: remove share after the share role Denied has been disabled (Project Space) + Given using spaces DAV path + And the administrator has enabled the permissions role "Denied" + 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 "Alice" has created a folder "folderToShare" in space "new-space" + And user "Alice" has sent the following resource share invitation: + | resource | folderToShare | + | space | new-space | + | sharee | Brian | + | shareType | user | + | permissionsRole | Denied | + And the administrator has disabled the permissions role "Denied" + When user "Alice" removes the access of user "Brian" from resource "folderToShare" of space "new-space" using the Graph API + Then the HTTP status code should be "204" + And for user "Brian" the space "Shares" should not contain these entries: + | folderToShare |