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][full-ci] add test to check versions after changing roles to and from EditorWithVersions role #11122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -1194,3 +1194,99 @@ Feature: an user shares resources
}
}
"""


Scenario Outline: sharee checks versions after updating the permission role of a shared file from other roles to FileEditorWithVersions
Given using spaces DAV path
And the administrator has enabled the permissions role 'File Editor With Versions'
And user "Alice" has uploaded file with content "to share" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | textfile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions-role> |
And user "Alice" has updated the last resource share with the following properties:
| permissionsRole | File Editor With Versions |
| space | Personal |
| resource | textfile.txt |
And user "Brian" has uploaded file with content "updated content" to "Shares/textfile.txt"
When user "Brian" gets the number of versions of file "textfile.txt" using file-id "<<FILEID>>"
Then the HTTP status code should be "207"
And the number of versions should be "1"
Examples:
| permissions-role |
| File Editor |
| Viewer |


Scenario Outline: sharee tries to check versions after updating the permission role of a shared file from FileEditorWithVersions to other roles
Given using spaces DAV path
And the administrator has enabled the permissions role 'File Editor With Versions'
And user "Alice" has uploaded file with content "to share" to "textfile.txt"
And user "Alice" has sent the following resource share invitation:
| resource | textfile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor With Versions |
And user "Brian" has uploaded file with content "updated content" to "Shares/textfile.txt"
And user "Alice" has updated the last resource share with the following properties:
| permissionsRole | <permissions-role> |
| space | Personal |
| resource | textfile.txt |
When user "Brian" tries to get versions of file "textfile.txt" from "Alice"
Then the HTTP status code should be "403"
Examples:
| permissions-role |
| File Editor |
| Viewer |


Scenario Outline: sharee checks versions after updating the permission role of the shared folder from other roles to EditorWithVersions
Given the administrator has enabled the permissions role 'Editor With Versions'
And user "Alice" has created folder "folderToShare"
And user "Alice" has uploaded file with content "to share" to "folderToShare/textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | folderToShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions-role> |
And user "Alice" has updated the last resource share with the following properties:
| permissionsRole | Editor With Versions |
| space | Personal |
| resource | folderToShare |
And user "Brian" has uploaded file with content "updated content" to "Shares/folderToShare/textfile.txt"
When user "Brian" gets the number of versions of file "textfile.txt" using file-id "<<FILEID>>"
Then the HTTP status code should be "207"
And the number of versions should be "1"
Examples:
| permissions-role |
| Editor |
| Viewer |


Scenario Outline: sharee tries to check versions after updating the permission role of the shared folder from EditorWithVersions to other roles
Given the administrator has enabled the permissions role 'Editor With Versions'
And user "Alice" has created folder "folderToShare"
And user "Alice" has uploaded file with content "to share" to "folderToShare/textfile.txt"
And user "Alice" has sent the following resource share invitation:
| resource | folderToShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor With Versions |
And user "Brian" has uploaded file with content "updated content" to "Shares/folderToShare/textfile.txt"
And user "Alice" has updated the last resource share with the following properties:
| permissionsRole | <permissions-role> |
| space | Personal |
| resource | folderToShare |
When user "Brian" tries to get versions of file "folderToShare/textfile.txt" from "Alice"
Then the HTTP status code should be "403"
Examples:
| permissions-role |
| Editor |
| Viewer |