Skip to content
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] add tests demonstrating issue-product-203 in sharePermissionsUsers sc… #4210

Merged
merged 1 commit into from
Oct 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ config = {
'webUISharingFolderPermissionMultipleUsers',
'webUISharingFolderPermissionsGroups',
],
'webUIOCIS5': [
'webUISharingPermissionsUsers'
],
},
'extraEnvironment': {
'NODE_TLS_REJECT_UNAUTHORIZED': '0',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,29 @@ Feature: Sharing files and folders with internal users with different permission
When the user sets custom permission for current role of collaborator "User One" for folder "simple-folder" to "share" using the webUI
Then custom permission "share" should be set for user "User One" for folder "simple-folder" on the webUI
And user "user1" should have received a share with these details:
| field | value |
| uid_owner | user2 |
| share_with | user1 |
| field | value |
| uid_owner | user2 |
| share_with | user1 |
| file_target | /Shares/simple-folder |
| item_type | folder |
| permissions | read, share |
| item_type | folder |
| permissions | read, share |

@skipOnOC10 @issue-product-203 @issue-ocis-717
#after fixing the issue delete this scenario and use the one above by deleting the @skipOnOCIS tag there
Scenario: Change permissions of the previously shared folder
Given user "user2" has shared folder "simple-folder" with user "user1" with "read" permissions
And user "user1" has accepted the share "simple-folder" offered by user "user2"
And user "user2" has logged in using the webUI
Then no custom permissions should be set for collaborator "User One" for folder "simple-folder" on the webUI
When the user sets custom permission for current role of collaborator "User One" for folder "simple-folder" to "share" using the webUI
Then custom permission "share" should be set for user "User One" for folder "simple-folder" on the webUI
And user "user1" should have received a share with these details:
| field | value |
| uid_owner | user2 |
| share_with | user1 |
| file_target | /simple-folder |
| item_type | folder |
| permissions | read, share |

@issue-1853
@skipOnOCIS @issue-product-270
Expand Down Expand Up @@ -86,12 +103,12 @@ Feature: Sharing files and folders with internal users with different permission
Then user "User One" should be listed as "<displayed-role>" in the collaborators list for folder "simple-folder" on the webUI
And custom permissions "<displayed-permissions>" should be set for user "User One" for folder "simple-folder" on the webUI
Then user "user1" should have received a share with these details:
| field | value |
| uid_owner | user2 |
| share_with | user1 |
| field | value |
| uid_owner | user2 |
| share_with | user1 |
| file_target | /Shares/simple-folder |
| item_type | folder |
| permissions | <permissions> |
| item_type | folder |
| permissions | <permissions> |
Examples:
| role | displayed-role | extra-permissions | displayed-permissions | permissions |
| Viewer | Viewer | share | share | read, share |
Expand All @@ -100,6 +117,29 @@ Feature: Sharing files and folders with internal users with different permission
| Advanced permissions | Advanced permissions | update, share | share, update | read, update, share |
| Advanced permissions | Editor | delete, share, create, update | share | read, share, delete, update, create |

@skipOnOC10 @issue-product-203
#after fixing the issue delete this scenario and use the one above by deleting the @skipOnOCIS tag there
Scenario Outline: share a folder with another internal user assigning a role and the permissions
Given user "user2" has logged in using the webUI
When the user shares folder "simple-folder" with user "User One" as "<role>" with permissions "<extra-permissions>" using the webUI
And user "user1" accepts the share "simple-folder" offered by user "user2" using the sharing API
Then user "User One" should be listed as "<displayed-role>" in the collaborators list for folder "simple-folder" on the webUI
And custom permissions "<displayed-permissions>" should be set for user "User One" for folder "simple-folder" on the webUI
Then user "user1" should have received a share with these details:
| field | value |
| uid_owner | user2 |
| share_with | user1 |
| file_target | /simple-folder |
| item_type | folder |
| permissions | <permissions> |
Examples:
| role | displayed-role | extra-permissions | displayed-permissions | permissions |
| Viewer | Viewer | share | share | read, share |
| Editor | Editor | share | share | all |
| Advanced permissions | Advanced permissions | share, create | share, create, update | read, share, create, update |
| Advanced permissions | Advanced permissions | update, share | share, update | read, update, share |
| Advanced permissions | Editor | delete, share, create, update | share | read, share, delete, update, create |

@skipOnOCIS @issue-product-203
Scenario Outline: Change permissions of the previously shared file
Given user "user2" has shared file "lorem.txt" with user "user1" with "<initial-permissions>" permissions
Expand All @@ -109,12 +149,33 @@ Feature: Sharing files and folders with internal users with different permission
When the user sets custom permission for current role of collaborator "User One" for file "lorem.txt" to "share" using the webUI
Then custom permission "share" should be set for user "User One" for file "lorem.txt" on the webUI
And user "user1" should have received a share with these details:
| field | value |
| uid_owner | user2 |
| share_with | user1 |
| field | value |
| uid_owner | user2 |
| share_with | user1 |
| file_target | /Shares/lorem.txt |
| item_type | file |
| permissions | <permissions> |
| item_type | file |
| permissions | <permissions> |
Examples:
| initial-permissions | permissions |
| read, update | read, share, update |
| read | read, share |

@skipOnOC10 @issue-product-203
#after fixing the issue delete this scenario and use the one above by deleting the @skipOnOCIS tag there
Scenario Outline: Change permissions of the previously shared file
Given user "user2" has shared file "lorem.txt" with user "user1" with "<initial-permissions>" permissions
And user "user1" has accepted the share "lorem.txt" offered by user "user2"
And user "user2" has logged in using the webUI
Then no custom permissions should be set for collaborator "User One" for file "lorem.txt" on the webUI
When the user sets custom permission for current role of collaborator "User One" for file "lorem.txt" to "share" using the webUI
Then custom permission "share" should be set for user "User One" for file "lorem.txt" on the webUI
And user "user1" should have received a share with these details:
| field | value |
| uid_owner | user2 |
| share_with | user1 |
| file_target | /lorem.txt |
| item_type | file |
| permissions | <permissions> |
Examples:
| initial-permissions | permissions |
| read, update | read, share, update |
Expand All @@ -129,12 +190,29 @@ Feature: Sharing files and folders with internal users with different permission
When the user disables all the custom permissions of collaborator "User One" for file "lorem.txt" using the webUI
Then no custom permissions should be set for collaborator "User One" for file "lorem.txt" on the webUI
And user "user1" should have received a share with these details:
| field | value |
| uid_owner | user2 |
| share_with | user1 |
| field | value |
| uid_owner | user2 |
| share_with | user1 |
| file_target | /Shares/lorem.txt |
| item_type | file |
| permissions | read |
| item_type | file |
| permissions | read |

@skipOnOC10 @issue-product-203
#after fixing the issue delete this scenario and use the one above by deleting the @skipOnOCIS tag there
Scenario: Delete all custom permissions of the previously shared file
Given user "user2" has shared file "lorem.txt" with user "user1" with "read, share" permissions
And user "user1" has accepted the share "lorem.txt" offered by user "user2"
And user "user2" has logged in using the webUI
Then custom permissions "share" should be set for user "User One" for file "lorem.txt" on the webUI
When the user disables all the custom permissions of collaborator "User One" for file "lorem.txt" using the webUI
Then no custom permissions should be set for collaborator "User One" for file "lorem.txt" on the webUI
And user "user1" should have received a share with these details:
| field | value |
| uid_owner | user2 |
| share_with | user1 |
| file_target | /lorem.txt |
| item_type | file |
| permissions | read |

@skipOnOCIS @issue-product-203
Scenario Outline: share a file with another internal user assigning a role and the permissions
Expand All @@ -144,12 +222,33 @@ Feature: Sharing files and folders with internal users with different permission
Then user "User One" should be listed as "<displayed-role>" in the collaborators list for file "lorem.txt" on the webUI
And custom permissions "<displayed-permissions>" should be set for user "User One" for file "lorem.txt" on the webUI
Then user "user1" should have received a share with these details:
| field | value |
| uid_owner | user2 |
| share_with | user1 |
| field | value |
| uid_owner | user2 |
| share_with | user1 |
| file_target | /Shares/lorem.txt |
| item_type | file |
| permissions | <permissions> |
| item_type | file |
| permissions | <permissions> |
Examples:
| role | displayed-role | collaborators-permissions | displayed-permissions | permissions |
| Viewer | Viewer | share | share | read, share |
| Editor | Editor | share | share | read, share, update |
| Advanced permissions | Editor | share, update | share | read, share, update |

@skipOnOC10 @issue-product-203
#after fixing the issue delete this scenario and use the one above by deleting the @skipOnOCIS tag there
Scenario Outline: share a file with another internal user assigning a role and the permissions
Given user "user2" has logged in using the webUI
When the user shares file "lorem.txt" with user "User One" as "<role>" with permissions "<collaborators-permissions>" using the webUI
And user "user1" accepts the share "lorem.txt" offered by user "user2" using the sharing API
Then user "User One" should be listed as "<displayed-role>" in the collaborators list for file "lorem.txt" on the webUI
And custom permissions "<displayed-permissions>" should be set for user "User One" for file "lorem.txt" on the webUI
Then user "user1" should have received a share with these details:
| field | value |
| uid_owner | user2 |
| share_with | user1 |
| file_target | /lorem.txt |
| item_type | file |
| permissions | <permissions> |
Examples:
| role | displayed-role | collaborators-permissions | displayed-permissions | permissions |
| Viewer | Viewer | share | share | read, share |
Expand Down Expand Up @@ -208,7 +307,7 @@ Feature: Sharing files and folders with internal users with different permission
Then the error message with header "Error while sharing." should be displayed on the webUI
And user "user3" should not have received any shares
And as "user3" folder "/Shares/simple-empty-folder" should not exist

@skipOnOCIS @issue-product-203
Scenario: User is allowed to update permissions of a reshared sub-folder within the permissions that the user has received
Given user "user3" has been created with default attributes
Expand All @@ -221,9 +320,29 @@ Feature: Sharing files and folders with internal users with different permission
And the user shares folder "simple-empty-folder" with user "User Three" as "Advanced permissions" with permissions "share, delete, create, update" using the webUI
And user "user3" accepts the share "simple-folder/simple-empty-folder" offered by user "user1" using the sharing API
Then user "user3" should have received a share with these details:
| field | value |
| uid_owner | user1 |
| share_with | user3 |
| field | value |
| uid_owner | user1 |
| share_with | user3 |
| file_target | /Shares/simple-empty-folder |
| item_type | folder |
| permissions | all |
| item_type | folder |
| permissions | all |

@skipOnOC10 @issue-product-203 @issue-ocis-reva-372
#after fixing the issue delete this scenario and use the one above by deleting the @skipOnOCIS tag there
Scenario: User is allowed to update permissions of a reshared sub-folder within the permissions that the user has received
Given user "user3" has been created with default attributes
And user "user2" has shared folder "simple-folder" with user "user1" with "all" permissions
And user "user1" has accepted the share "simple-folder" offered by user "user2"
And user "user1" has shared folder "/Shares/simple-folder" with user "user3" with "share, delete" permissions
And user "user1" has logged in using the webUI
When the user opens folder "Shares" using the webUI
And the user browses to the folder "simple-folder" on the files page
And the user shares folder "simple-empty-folder" with user "User Three" as "Advanced permissions" with permissions "share, delete, create, update" using the webUI
And user "user3" accepts the share "simple-empty-folder" offered by user "user1" using the sharing API
Then user "user3" should have received a share with these details:
| field | value |
| uid_owner | user1 |
| share_with | user3 |
| file_target | /simple-empty-folder |
| item_type | folder |
| permissions | all |