-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tests-Only] Refactor restrict sharing and auto completion tests #4108
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -6,6 +6,8 @@ Feature: restrict resharing | |||||||||||||||||
I want to be able to forbid a user that received a share from me to share it further | ||||||||||||||||||
|
||||||||||||||||||
Background: | ||||||||||||||||||
Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" | ||||||||||||||||||
And the administrator has set the default folder for received shares to "Shares" | ||||||||||||||||||
Given these users have been created with default attributes: | ||||||||||||||||||
| username | | ||||||||||||||||||
Comment on lines
+9
to
12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
| user1 | | ||||||||||||||||||
|
@@ -22,22 +24,28 @@ Feature: restrict resharing | |||||||||||||||||
Scenario: disable resharing and check if the received resource can be reshared | ||||||||||||||||||
Given the setting "shareapi_allow_resharing" of app "core" has been set to "no" | ||||||||||||||||||
And user "user2" has shared folder "simple-folder" with user "user1" | ||||||||||||||||||
And user "user1" has favorited element "simple-folder (2)" | ||||||||||||||||||
And user "user1" has accepted the share "simple-folder" offered by user "user2" | ||||||||||||||||||
And user "user1" has favorited element "/Shares/simple-folder" | ||||||||||||||||||
When user "user1" logs in using the webUI | ||||||||||||||||||
Then the user should not be able to share folder "simple-folder (2)" using the webUI | ||||||||||||||||||
And the user opens folder "Shares" using the webUI | ||||||||||||||||||
Then the user should not be able to share folder "simple-folder" using the webUI | ||||||||||||||||||
When the user browses to the shared-with-me page | ||||||||||||||||||
# Then the user should not be able to share folder "simple-folder (2)" using the webUI | ||||||||||||||||||
And the user shares folder "simple-folder (2)" with user "User Three" as "Editor" using the webUI | ||||||||||||||||||
And the user shares folder "simple-folder" with user "User Three" as "Editor" using the webUI | ||||||||||||||||||
Then the error message with header "Error while sharing." should be displayed on the webUI | ||||||||||||||||||
And as "user3" folder "simple-folder (2)" should not exist | ||||||||||||||||||
And as "user3" folder "simple-folder" should not exist | ||||||||||||||||||
When the user browses to the favorites page | ||||||||||||||||||
Then the user should not be able to share folder "simple-folder (2)" using the webUI | ||||||||||||||||||
Then the user should not be able to share folder "Shares/simple-folder" using the webUI | ||||||||||||||||||
|
||||||||||||||||||
@smokeTest | ||||||||||||||||||
Scenario: disable resharing and check if the received resource from group share can be reshared | ||||||||||||||||||
Given the setting "shareapi_allow_resharing" of app "core" has been set to "no" | ||||||||||||||||||
And user "user3" has shared file "lorem.txt" with group "grp1" | ||||||||||||||||||
And user "user1" has accepted the share "lorem.txt" offered by user "user3" | ||||||||||||||||||
And user "user2" has accepted the share "lorem.txt" offered by user "user3" | ||||||||||||||||||
When user "user1" logs in using the webUI | ||||||||||||||||||
Then the user should not be able to share file "lorem (2).txt" using the webUI | ||||||||||||||||||
And the user opens folder "Shares" using the webUI | ||||||||||||||||||
Then the user should not be able to share file "lorem.txt" using the webUI | ||||||||||||||||||
When the user re-logs in as "user2" using the webUI | ||||||||||||||||||
Then the user should not be able to share file "lorem (2).txt" using the webUI | ||||||||||||||||||
And the user opens folder "Shares" using the webUI | ||||||||||||||||||
Then the user should not be able to share file "lorem.txt" using the webUI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -5,6 +5,8 @@ Feature: restrict Sharing | |||||||||||||
So that users can only share files with specific users and groups | ||||||||||||||
|
||||||||||||||
Background: | ||||||||||||||
Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" | ||||||||||||||
And the administrator has set the default folder for received shares to "Shares" | ||||||||||||||
Given these users have been created with default attributes: | ||||||||||||||
| username | | ||||||||||||||
Comment on lines
+9
to
11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
| user1 | | ||||||||||||||
|
@@ -40,7 +42,8 @@ Feature: restrict Sharing | |||||||||||||
Scenario: Do not restrict users to only share with groups they are member of | ||||||||||||||
Given the setting "shareapi_only_share_with_membership_groups" of app "core" has been set to "no" | ||||||||||||||
When the user shares folder "simple-folder" with group "grp2" as "Viewer" using the webUI | ||||||||||||||
Then as "user3" folder "simple-folder (2)" should exist | ||||||||||||||
And user "user3" accepts the share "simple-folder" offered by user "user2" using the sharing API | ||||||||||||||
Then as "user3" folder "/Shares/simple-folder" should exist | ||||||||||||||
|
||||||||||||||
@smokeTest | ||||||||||||||
Scenario: Forbid sharing with groups | ||||||||||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.