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] enable sharing permission tests #4208

Merged
merged 2 commits into from
Oct 19, 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
8 changes: 8 additions & 0 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@ config = {
'webUISharingAcceptShares',
'webUISharingAutocompletion',
],
'webUIOCIS4': [
'webUISharingFilePermissionMultipleUsers',
'webUISharingFilePermissionsGroups',
'webUISharingFolderAdvancedPermissionMultipleUsers',
'webUISharingFolderAdvancedPermissionsGroups',
'webUISharingFolderPermissionMultipleUsers',
'webUISharingFolderPermissionsGroups',
],
},
'extraEnvironment': {
'NODE_TLS_REJECT_UNAUTHORIZED': '0',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@skipOnOCIS @issue-product-203
Feature: Sharing files with multiple internal users with different permissions
As a user
I want to set different permissions on shared files with other users
Expand All @@ -12,6 +11,7 @@ Feature: Sharing files with multiple internal users with different permissions
| user1 |
| user2 |

@skipOnOCIS @issue-product-203
Scenario Outline: share a file with multiple users with different roles and permissions
Given these users have been created with default attributes:
| username |
Expand Down Expand Up @@ -64,3 +64,58 @@ Feature: Sharing files with multiple internal users with different permissions
| Advanced permissions | Viewer | share | share | read, share |
| Advanced permissions | Editor | update | , | read, update |
| Advanced permissions | Editor | share, update | share | read, update, 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: share a file with multiple users with different roles and permissions
Given these users have been created with default attributes:
| username |
| user0 |
| user3 |
| user4 |
And user "user1" has logged in using the webUI
When the user opens the share dialog for file "lorem.txt" using the webUI
And the user opens the share creation dialog in the webUI
And the user selects the following collaborators for the share as "<role>" with "<extra-permissions>" permissions:
| collaborator | type |
| Regular User | user |
| User Two | user |
| User Three | user |
| User Four | user |
And the user removes "User Four" as a collaborator from the share
And the user removes "Regular User" as a collaborator from the share
And the user shares with the selected collaborators
And user "user2" accepts the share "lorem.txt" offered by user "user1" using the sharing API
And user "user3" accepts the share "lorem.txt" offered by user "user1" using the sharing API
Then custom permissions "<displayed-permissions>" should be set for user "User Two" for file "lorem.txt" on the webUI
And custom permissions "<displayed-permissions>" should be set for user "User Three" for file "lorem.txt" on the webUI
And user "User Two" should be listed as "<displayed-role>" in the collaborators list for file "lorem.txt" on the webUI
And user "User Three" should be listed as "<displayed-role>" in the collaborators list for file "lorem.txt" on the webUI
And user "user2" should have received a share with these details:
| field | value |
| uid_owner | user1 |
| share_with | user2 |
| file_target | /lorem.txt |
| item_type | file |
| permissions | <actual-permissions> |
And user "user3" should have received a share with these details:
| field | value |
| uid_owner | user1 |
| share_with | user3 |
| file_target | /lorem.txt |
| item_type | file |
| permissions | <actual-permissions> |
But user "Regular User" should not be listed in the collaborators list on the webUI
And as "user0" file "/Shares/lorem.txt" should not exist
And user "User Four" should not be listed in the collaborators list on the webUI
And as "user4" file "/Shares/lorem.txt" should not exist
Examples:
| role | displayed-role | extra-permissions | displayed-permissions | actual-permissions |
| Viewer | Viewer | share | share | read, share |
| Viewer | Viewer | , | , | read |
| Editor | Editor | share | share | share, read, update |
| Editor | Editor | , | , | read, update |
| Advanced permissions | Viewer | , | , | read |
| Advanced permissions | Viewer | share | share | read, share |
| Advanced permissions | Editor | update | , | read, update |
| Advanced permissions | Editor | share, update | share | read, update, share |
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@skipOnOCIS @issue-product-203
Feature: Sharing folders with multiple internal users using advanced permissions
As a user
I want to set advanced permissions on shared folders with other users
Expand All @@ -12,6 +11,7 @@ Feature: Sharing folders with multiple internal users using advanced permissions
| user1 |
| user2 |

@skipOnOCIS @issue-product-203
Scenario Outline: share a folder with multiple users using role as advanced permissions role and different extra permissions
Given these users have been created with default attributes:
| username |
Expand Down Expand Up @@ -68,3 +68,62 @@ Feature: Sharing folders with multiple internal users using advanced permissions
| Advanced permissions | Advanced permissions | share, delete, update | share, delete, update | read, share, delete, update |
| Advanced permissions | Advanced permissions | share, create, delete | share, create, delete | read, share, delete, create |
| Advanced permissions | Advanced permissions | share, update, create | share, update, create | read, share, update, create |

@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 Outline: share a folder with multiple users using role as advanced permissions role and different extra permissions
Given these users have been created with default attributes:
| username |
| user0 |
| user3 |
| user4 |
And user "user1" has logged in using the webUI
When the user opens the share dialog for folder "simple-folder" using the webUI
And the user opens the share creation dialog in the webUI
And the user selects the following collaborators for the share as "<role>" with "<extra-permissions>" permissions:
| collaborator | type |
| Regular User | user |
| User Two | user |
| User Three | user |
| User Four | user |
And the user removes "User Four" as a collaborator from the share
And the user removes "Regular User" as a collaborator from the share
And the user shares with the selected collaborators
And user "user2" accepts the share "simple-folder" offered by user "user1" using the sharing API
And user "user3" accepts the share "simple-folder" offered by user "user1" using the sharing API
Then custom permissions "<displayed-permissions>" should be set for user "User Two" for folder "simple-folder" on the webUI
And custom permissions "<displayed-permissions>" should be set for user "User Three" for folder "simple-folder" on the webUI
And user "User Two" should be listed as "<displayed-role>" in the collaborators list for folder "simple-folder" on the webUI
And user "User Three" should be listed as "<displayed-role>" in the collaborators list for folder "simple-folder" on the webUI
And user "user2" should have received a share with these details:
| field | value |
| uid_owner | user1 |
| share_with | user2 |
| file_target | /simple-folder |
| item_type | folder |
| permissions | <actual-permissions> |
And user "user3" should have received a share with these details:
| field | value |
| uid_owner | user1 |
| share_with | user3 |
| file_target | /simple-folder |
| item_type | folder |
| permissions | <actual-permissions> |
But user "Regular User" should not be listed in the collaborators list on the webUI
And as "user0" folder "/Shares/simple-folder" should not exist
And user "User Four" should not be listed in the collaborators list on the webUI
And as "user4" folder "/Shares/simple-folder" should not exist
Examples:
| role | displayed-role | extra-permissions | displayed-permissions | actual-permissions |
| Advanced permissions | Advanced permissions | delete | delete | read, delete |
| Advanced permissions | Advanced permissions | update | update | read, update |
| Advanced permissions | Advanced permissions | create | create, update | read, create, update |
| Advanced permissions | Advanced permissions | share, delete | share, delete | read, share, delete |
| Advanced permissions | Advanced permissions | share, update | share, update | read, update, share |
| Advanced permissions | Advanced permissions | share, create | share, create, update | read, share, create, update |
| Advanced permissions | Advanced permissions | delete, update | delete, update | read, delete, update |
| Advanced permissions | Editor | delete, create | | read, delete, create, update |
| Advanced permissions | Advanced permissions | update, create | update, create | read, update, create |
| Advanced permissions | Advanced permissions | share, delete, update | share, delete, update | read, share, delete, update |
| Advanced permissions | Editor | share, create, delete | share | read, share, delete, create, update |
| Advanced permissions | Advanced permissions | share, update, create | share, update, create | read, share, update, create |
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@skipOnOCIS @issue-product-203
Feature: Sharing folders with multiple internal users with different permissions
As a user
I want to set different permissions on shared folders with other users
Expand All @@ -12,6 +11,7 @@ Feature: Sharing folders with multiple internal users with different permissions
| user1 |
| user2 |

@skipOnOCIS @issue-product-203
Scenario Outline: share a folder with multiple users with different roles and permissions
Given these users have been created with default attributes:
| username |
Expand Down Expand Up @@ -64,3 +64,58 @@ Feature: Sharing folders with multiple internal users with different permissions
| Advanced permissions | Viewer | share | share | read, share |
| Advanced permissions | Editor | delete, update, create | , | read, delete, update, create |
| Advanced permissions | Editor | share, delete, update, create | share | all |

@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 multiple users with different roles and permissions
Given these users have been created with default attributes:
| username |
| user0 |
| user3 |
| user4 |
And user "user1" has logged in using the webUI
When the user opens the share dialog for folder "simple-folder" using the webUI
And the user opens the share creation dialog in the webUI
And the user selects the following collaborators for the share as "<role>" with "<extra-permissions>" permissions:
| collaborator | type |
| Regular User | user |
| User Two | user |
| User Three | user |
| User Four | user |
And the user removes "User Four" as a collaborator from the share
And the user removes "Regular User" as a collaborator from the share
And the user shares with the selected collaborators
And user "user2" accepts the share "simple-folder" offered by user "user1" using the sharing API
And user "user3" accepts the share "simple-folder" offered by user "user1" using the sharing API
Then custom permissions "<displayed-permissions>" should be set for user "User Two" for folder "simple-folder" on the webUI
And custom permissions "<displayed-permissions>" should be set for user "User Three" for folder "simple-folder" on the webUI
And user "User Two" should be listed as "<displayed-role>" in the collaborators list for folder "simple-folder" on the webUI
And user "User Three" should be listed as "<displayed-role>" in the collaborators list for folder "simple-folder" on the webUI
And user "user2" should have received a share with these details:
| field | value |
| uid_owner | user1 |
| share_with | user2 |
| file_target | /simple-folder |
| item_type | folder |
| permissions | <actual-permissions> |
And user "user3" should have received a share with these details:
| field | value |
| uid_owner | user1 |
| share_with | user3 |
| file_target | /simple-folder |
| item_type | folder |
| permissions | <actual-permissions> |
But user "Regular User" should not be listed in the collaborators list on the webUI
And as "user0" folder "simple-folder (2)" should not exist
And user "User Four" should not be listed in the collaborators list on the webUI
And as "user4" folder "simple-folder (2)" should not exist
Examples:
| role | displayed-role | extra-permissions | displayed-permissions | actual-permissions |
| Viewer | Viewer | share | share | read, share |
| Viewer | Viewer | , | , | read |
| Editor | Editor | share | share | all |
| Editor | Editor | , | , | read, update, delete, create |
| Advanced permissions | Viewer | , | , | read |
| Advanced permissions | Viewer | share | share | read, share |
| Advanced permissions | Editor | delete, update, create | , | read, delete, update, create |
| Advanced permissions | Editor | share, delete, update, create | share | all |