2022-10-25 13:48:01 +02:00
|
|
|
Feature: Report test
|
2023-04-17 17:05:12 +05:45
|
|
|
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
|
2022-10-25 13:48:01 +02:00
|
|
|
|
|
|
|
|
Background:
|
2024-11-29 09:39:21 +05:45
|
|
|
Given these users have been created with default attributes:
|
2022-10-25 13:48:01 +02:00
|
|
|
| username |
|
|
|
|
|
| Alice |
|
|
|
|
|
| Brian |
|
|
|
|
|
And using spaces DAV path
|
2023-06-15 15:56:48 +02:00
|
|
|
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
2023-10-30 17:57:42 +05:45
|
|
|
And user "Alice" has created a space "find data" with the default quota using the Graph API
|
2022-10-25 13:48:01 +02:00
|
|
|
And user "Alice" has created a folder "folderMain/SubFolder1/subFOLDER2" in space "find data"
|
|
|
|
|
And user "Alice" has uploaded a file inside space "find data" with content "some content" to "folderMain/SubFolder1/subFOLDER2/insideTheFolder.txt"
|
|
|
|
|
|
|
|
|
|
|
2024-11-07 14:12:16 +05:45
|
|
|
Scenario Outline: check the response of the found folder
|
|
|
|
|
Given using <dav-path-version> DAV path
|
|
|
|
|
And user "Alice" has sent the following resource share invitation:
|
2024-05-02 14:52:18 +05:45
|
|
|
| resource | folderMain |
|
|
|
|
|
| space | find data |
|
|
|
|
|
| sharee | Brian |
|
|
|
|
|
| shareType | user |
|
|
|
|
|
| permissionsRole | Viewer |
|
2024-07-25 18:09:28 +05:45
|
|
|
And user "Brian" has a share "folderMain" synced
|
2022-10-25 13:48:01 +02:00
|
|
|
When user "Brian" searches for "SubFolder1" using the WebDAV API
|
|
|
|
|
Then the HTTP status code should be "207"
|
2023-07-12 09:11:55 +02:00
|
|
|
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:
|
2024-07-09 17:06:32 +05:45
|
|
|
| key | value |
|
2024-10-01 12:58:30 +05:45
|
|
|
| oc:fileid | %file_id_pattern% |
|
|
|
|
|
| oc:file-parent | %file_id_pattern% |
|
2024-07-09 17:06:32 +05:45
|
|
|
| oc:shareroot | /folderMain |
|
|
|
|
|
| oc:name | SubFolder1 |
|
|
|
|
|
| d:getcontenttype | httpd/unix-directory |
|
|
|
|
|
| oc:permissions | S |
|
|
|
|
|
| oc:size | 12 |
|
2024-10-01 12:58:30 +05:45
|
|
|
| oc:remote-item-id | %file_id_pattern% |
|
2026-07-02 17:17:32 +05:45
|
|
|
| oc:spaceid | %space_id_pattern% |
|
2024-11-07 14:12:16 +05:45
|
|
|
Examples:
|
|
|
|
|
| dav-path-version |
|
|
|
|
|
| old |
|
|
|
|
|
| new |
|
|
|
|
|
| spaces |
|
2022-10-25 13:48:01 +02:00
|
|
|
|
|
|
|
|
|
2024-11-07 14:12:16 +05:45
|
|
|
Scenario Outline: check the response of the found file
|
|
|
|
|
Given using <dav-path-version> DAV path
|
|
|
|
|
And user "Alice" has sent the following resource share invitation:
|
2024-05-02 14:52:18 +05:45
|
|
|
| resource | folderMain |
|
|
|
|
|
| space | find data |
|
|
|
|
|
| sharee | Brian |
|
|
|
|
|
| shareType | user |
|
|
|
|
|
| permissionsRole | Editor |
|
2024-07-25 18:09:28 +05:45
|
|
|
And user "Brian" has a share "folderMain" synced
|
2022-10-25 13:48:01 +02:00
|
|
|
When user "Brian" searches for "insideTheFolder.txt" using the WebDAV API
|
|
|
|
|
Then the HTTP status code should be "207"
|
2023-07-12 09:11:55 +02:00
|
|
|
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 "insideTheFolder.txt" with these key and value pairs:
|
2024-10-01 12:58:30 +05:45
|
|
|
| key | value |
|
|
|
|
|
| oc:fileid | %file_id_pattern% |
|
|
|
|
|
| oc:file-parent | %file_id_pattern% |
|
|
|
|
|
| oc:shareroot | /folderMain |
|
|
|
|
|
| oc:name | insideTheFolder.txt |
|
|
|
|
|
| d:getcontenttype | text/plain |
|
|
|
|
|
| oc:permissions | SD |
|
|
|
|
|
| d:getcontentlength | 12 |
|
|
|
|
|
| oc:remote-item-id | %file_id_pattern% |
|
2026-07-02 17:17:32 +05:45
|
|
|
| oc:spaceid | %space_id_pattern% |
|
2024-11-07 14:12:16 +05:45
|
|
|
Examples:
|
|
|
|
|
| dav-path-version |
|
|
|
|
|
| old |
|
|
|
|
|
| new |
|
|
|
|
|
| spaces |
|
2023-04-18 16:46:11 +05:45
|
|
|
|
2023-08-16 09:29:00 +05:45
|
|
|
|
2024-11-07 14:12:16 +05:45
|
|
|
Scenario Outline: search for the shared folder when the share is not accepted
|
|
|
|
|
Given using <dav-path-version> DAV path
|
|
|
|
|
And user "Brian" has disabled auto-accepting
|
2024-05-08 14:22:52 +05:45
|
|
|
And user "Alice" has sent the following resource share invitation:
|
2024-05-02 14:52:18 +05:45
|
|
|
| resource | folderMain |
|
|
|
|
|
| space | find data |
|
|
|
|
|
| sharee | Brian |
|
|
|
|
|
| shareType | user |
|
|
|
|
|
| permissionsRole | Viewer |
|
2023-04-18 16:46:11 +05:45
|
|
|
When user "Brian" searches for "folderMain" using the WebDAV API
|
|
|
|
|
Then the HTTP status code should be "207"
|
2023-07-12 09:11:55 +02:00
|
|
|
And the following headers should match these regular expressions
|
2024-10-01 18:07:47 +05:45
|
|
|
| X-Request-Id | %request_id_pattern% |
|
2023-04-18 16:46:11 +05:45
|
|
|
And the search result should contain "0" entries
|
2024-11-07 14:12:16 +05:45
|
|
|
Examples:
|
|
|
|
|
| dav-path-version |
|
|
|
|
|
| old |
|
|
|
|
|
| new |
|
|
|
|
|
| spaces |
|