summaryrefslogtreecommitdiffstats
path: root/tests/acceptance/features/app-files-sharing.feature
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2020-11-10 22:16:10 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2020-11-11 01:35:27 +0100
commit22d949d9d9da89eb2395b1259c44db17d1db5856 (patch)
treee03153aa8f26c212a80573cdd861227e9568fed5 /tests/acceptance/features/app-files-sharing.feature
parenta1d79b2b2bd8bef37c30b5426c94724f9f9d6ab6 (diff)
downloadnextcloud-server-22d949d9d9da89eb2395b1259c44db17d1db5856.tar.gz
nextcloud-server-22d949d9d9da89eb2395b1259c44db17d1db5856.zip
Add acceptance tests for reshares when resharing is disabled
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests/acceptance/features/app-files-sharing.feature')
-rw-r--r--tests/acceptance/features/app-files-sharing.feature104
1 files changed, 104 insertions, 0 deletions
diff --git a/tests/acceptance/features/app-files-sharing.feature b/tests/acceptance/features/app-files-sharing.feature
index b6cde94455c..4f58d1d17ff 100644
--- a/tests/acceptance/features/app-files-sharing.feature
+++ b/tests/acceptance/features/app-files-sharing.feature
@@ -246,6 +246,110 @@ Feature: app-files-sharing
And I enter in the folder named "Shared folder"
Then I see that the file list contains a file named "Subfolder"
+ Scenario: sharer does not see resharing option for a folder if resharing is disabled in the settings after the share is created
+ Given I am logged in as the admin
+ And I create a new folder named "Shared folder"
+ And I see that the file list contains a file named "Shared folder"
+ And I share "Shared folder" with "user0"
+ And I see that the file is shared with "user0"
+ When I visit the settings page
+ And I open the "Sharing" section of the "Administration" group
+ And I disable resharing
+ And I see that resharing is disabled
+ Then I open the Files app
+ And I open the details view for "Shared folder"
+ And I see that the details view is open
+ And I open the "Sharing" tab in the details view
+ And I see that the "Sharing" tab in the details view is eventually loaded
+ And I see that resharing for "user0" is not available
+
+ Scenario: sharee can not reshare a folder if resharing is disabled in the settings after the share is created
+ Given I act as John
+ And I am logged in as the admin
+ And I act as Jane
+ And I am logged in
+ And I act as John
+ And I create a new folder named "Shared folder"
+ And I see that the file list contains a file named "Shared folder"
+ And I share "Shared folder" with "user0"
+ And I see that the file is shared with "user0"
+ And I visit the settings page
+ And I open the "Sharing" section of the "Administration" group
+ And I disable resharing
+ And I see that resharing is disabled
+ When I act as Jane
+ # The Files app is open again to reload the file list
+ And I open the Files app
+ Then I see that the file list contains a file named "Shared folder"
+ And I open the details view for "Shared folder"
+ And I see that the details view is open
+ And I open the "Sharing" tab in the details view
+ And I see that the "Sharing" tab in the details view is eventually loaded
+ And I see that the file is shared with me by "admin"
+ And I see that resharing the file is not allowed
+
+ Scenario: sharee can unshare a folder if resharing is disabled in the settings after the share is created
+ Given I act as John
+ And I am logged in as the admin
+ And I act as Jane
+ And I am logged in
+ And I act as John
+ And I create a new folder named "Shared folder"
+ And I see that the file list contains a file named "Shared folder"
+ And I share "Shared folder" with "user0"
+ And I see that the file is shared with "user0"
+ And I act as Jane
+ # The Files app is open again to reload the file list
+ And I open the Files app
+ And I share "Shared folder" with "user1"
+ And I act as John
+ And I visit the settings page
+ And I open the "Sharing" section of the "Administration" group
+ And I disable resharing
+ And I see that resharing is disabled
+ When I act as Jane
+ # The Files app is open again to reload the file list
+ And I open the Files app
+ Then I see that the file list contains a file named "Shared folder"
+ And I open the details view for "Shared folder"
+ And I see that the details view is open
+ And I open the "Sharing" tab in the details view
+ And I see that the "Sharing" tab in the details view is eventually loaded
+ And I see that the file is shared with me by "admin"
+ And I unshare the share with "user1"
+ And I see that the file is not shared with "user1"
+
+ Scenario: resharee sees a folder created by the owner in a shared folder if resharing is disabled in the settings after the share is created
+ Given I act as John
+ And I am logged in as the admin
+ And I act as Jane
+ And I am logged in
+ And I act as Jim
+ And I am logged in as "user1"
+ And I act as John
+ And I create a new folder named "Shared folder"
+ And I see that the file list contains a file named "Shared folder"
+ And I share "Shared folder" with "user0"
+ And I see that the file is shared with "user0"
+ And I act as Jane
+ # The Files app is open again to reload the file list
+ And I open the Files app
+ And I share "Shared folder" with "user1"
+ And I act as John
+ And I visit the settings page
+ And I open the "Sharing" section of the "Administration" group
+ And I disable resharing
+ And I see that resharing is disabled
+ And I open the Files app
+ And I enter in the folder named "Shared folder"
+ And I create a new folder named "Subfolder"
+ And I see that the file list contains a file named "Subfolder"
+ When I act as Jim
+ # The Files app is open again to reload the file list
+ And I open the Files app
+ And I enter in the folder named "Shared folder"
+ Then I see that the file list contains a file named "Subfolder"
+
Scenario: sharee can not reshare a folder if the sharer disables it
Given I act as John
And I am logged in as the admin