Files

164 lines
7.6 KiB
Gherkin
Raw Permalink Normal View History

Feature: REPORT request to Shares space
As a user
I want to check the share REPORT response
So that I can make sure that the response contains all the relevant details for shares
Background:
Given these users have been created with default attributes:
| username |
| Alice |
| Brian |
And user "Alice" has created folder "/folderMain"
And user "Alice" has created folder "/folderMain/SubFolder1"
And user "Alice" has created folder "/folderMain/SubFolder1/subFOLDER2"
And user "Alice" has sent the following resource share invitation:
| resource | /folderMain |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "folderMain" synced
Scenario Outline: check the REPORT response of the found folder
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
When user "Brian" searches for "SubFolder1" using the WebDAV API
Then the HTTP status code should be "207"
And the following headers should match these regular expressions
2024-10-01 18:07:47 +05:45
| X-Request-Id | %request_id_pattern% |
And as user "Brian" the REPORT response should contain a resource "SubFolder1" with these key and value pairs:
| key | value |
2024-10-01 12:58:30 +05:45
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %file_id_pattern% |
| oc:shareroot | /folderMain |
| oc:name | SubFolder1 |
| d:getcontenttype | httpd/unix-directory |
| oc:permissions | S |
2024-10-01 12:58:30 +05:45
| oc:remote-item-id | %file_id_pattern% |
| oc:spaceid | %space_id_pattern% |
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
Scenario Outline: check the REPORT response of the found file
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file with content "Not all those who wander are lost." to "/folderMain/SubFolder1/subFOLDER2/frodo.txt"
When user "Brian" searches for "frodo.txt" using the WebDAV API
Then the HTTP status code should be "207"
And the following headers should match these regular expressions
2024-10-01 18:07:47 +05:45
| X-Request-Id | %request_id_pattern% |
And as user "Brian" the REPORT response should contain a resource "frodo.txt" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %file_id_pattern% |
| oc:shareroot | /folderMain |
| oc:name | frodo.txt |
| d:getcontenttype | text/plain |
| oc:permissions | S |
| d:getcontentlength | 34 |
| oc:remote-item-id | %file_id_pattern% |
| oc:spaceid | %space_id_pattern% |
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
Scenario Outline: search for the shared folder when share is not accepted
Given user "Brian" has disabled auto-accepting
And using <dav-path-version> DAV path
And user "Alice" has created folder "/folderToBrian"
And user "Alice" has sent the following resource share invitation:
| resource | /folderToBrian |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
When user "Brian" searches for "folderToBrian" using the WebDAV API
Then the HTTP status code should be "207"
And the following headers should match these regular expressions
2024-10-01 18:07:47 +05:45
| X-Request-Id | %request_id_pattern% |
And the search result should contain "0" entries
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
@issue-9607 @env-config
Scenario Outline: check the REPORT response of a folder shared with secure viewer role
Given using <dav-path-version> DAV path
And the administrator has enabled the permissions role "Secure Viewer"
And user "Alice" has created folder "/secureFolder"
And user "Alice" has uploaded file with content "secure content" to "/secureFolder/secure.txt"
And user "Alice" has sent the following resource share invitation:
| resource | secureFolder |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Secure Viewer |
And user "Brian" has a share "secureFolder" synced
When user "Brian" searches for "secureFolder" using the WebDAV API
Then the HTTP status code should be "207"
And the following headers should match these regular expressions
2024-10-01 18:07:47 +05:45
| X-Request-Id | %request_id_pattern% |
And as user "Brian" the REPORT response should contain a resource "secureFolder" with these key and value pairs:
| key | value |
| oc:shareroot | /secureFolder |
| oc:name | secureFolder |
| d:getcontenttype | httpd/unix-directory |
| oc:permissions | SMX |
| oc:size | 14 |
2024-10-01 12:58:30 +05:45
| oc:remote-item-id | %file_id_pattern% |
| oc:spaceid | %space_id_pattern% |
When user "Brian" searches for "secure.txt" using the WebDAV API
And the following headers should match these regular expressions
2024-10-01 18:07:47 +05:45
| X-Request-Id | %request_id_pattern% |
Then the HTTP status code should be "207"
2024-10-01 18:07:47 +05:45
And as user "Brian" the REPORT response should contain a resource "secure.txt" with these key and value pairs:
| key | value |
| oc:shareroot | /secureFolder |
| oc:name | secure.txt |
| d:getcontenttype | text/plain |
| oc:permissions | SX |
| d:getcontentlength | 14 |
| oc:spaceid | %space_id_pattern% |
Examples:
| dav-path-version |
| old |
| new |
| spaces |
@issue-9607 @env-config
Scenario Outline: check the REPORT response of a file shared with secure viewer role
Given using <dav-path-version> DAV path
And the administrator has enabled the permissions role "Secure Viewer"
And user "Alice" has uploaded file with content "secure content" to "/secure.txt"
And user "Alice" has sent the following resource share invitation:
| resource | secure.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Secure Viewer |
And user "Brian" has a share "secure.txt" synced
When user "Brian" searches for "secure.txt" using the WebDAV API
Then the HTTP status code should be "207"
And the following headers should match these regular expressions
2024-10-01 18:07:47 +05:45
| X-Request-Id | %request_id_pattern% |
And as user "Brian" the REPORT response should contain a resource "secure.txt" with these key and value pairs:
| key | value |
| oc:shareroot | /secure.txt |
| oc:name | secure.txt |
| d:getcontenttype | text/plain |
| oc:permissions | SMX |
| d:getcontentlength | 14 |
| oc:spaceid | %space_id_pattern% |
Examples:
| dav-path-version |
| old |
| new |
| spaces |