2022-11-28 14:27:41 +05:45
Feature: Propfind test
2023-04-17 17:05:12 +05:45
As a user
I want to check the PROPFIND response
So that I can make sure that the response contains all the relevant values
2022-11-28 14:27:41 +05:45
Background:
2024-11-29 09:39:21 +05:45
Given these users have been created with default attributes:
2022-11-28 14:27:41 +05:45
| username |
| Alice |
2022-12-20 16:19:31 +05:45
| Brian |
2022-11-28 14:27:41 +05:45
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 " new-space " with the default quota using the Graph API
2022-11-28 14:27:41 +05:45
2022-12-21 16:33:11 +05:45
Scenario: space-admin checks the PROPFIND request of a space
2022-11-28 14:27:41 +05:45
Given user " Alice " has uploaded a file inside space " new-space " with content " some content " to " testfile.txt "
2024-03-13 14:26:37 +05:45
When user " Alice " sends PROPFIND request to space " new-space " with depth " 0 " using the WebDAV API
2022-11-28 14:27:41 +05:45
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% |
2024-10-01 12:58:30 +05:45
And as user " Alice " the PROPFIND response should contain a space " new-space " with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:name | new-space |
| oc:permissions | RDNVCKZP |
| oc:privatelink | %base_url%/f/[0-9a-z-$%]+ |
| oc:size | 12 |
2022-12-20 16:19:31 +05:45
2022-12-21 16:33:11 +05:45
Scenario Outline: space member with a different role checks the PROPFIND request of a space
2022-12-20 16:19:31 +05:45
Given user " Alice " has uploaded a file inside space " new-space " with content " some content " to " testfile.txt "
2024-05-08 14:22:52 +05:45
And user " Alice " has sent the following space share invitation:
2024-04-30 12:25:33 +05:45
| space | new-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | <space-role> |
2024-03-13 14:26:37 +05:45
When user " Brian " sends PROPFIND request to space " new-space " with depth " 0 " using the WebDAV API
2022-12-20 16:19:31 +05:45
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% |
2024-10-01 12:58:30 +05:45
And as user " Brian " the PROPFIND response should contain a space " new-space " with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:name | new-space |
| oc:permissions | <oc-permission> |
| oc:privatelink | %base_url%/f/[0-9a-z-$%]+ |
| oc:size | 12 |
2024-10-01 18:07:47 +05:45
Examples:
2024-04-30 12:25:33 +05:45
| space-role | oc-permission |
| Manager | RDNVCKZP |
| Space Editor | DNVCK |
| Space Viewer | |
2023-07-12 09:12:34 +02:00
Scenario Outline: space member with a different role checks the PROPFIND request of the folder in the space
Given user " Alice " has created a folder " folderMain " in space " new-space "
2024-05-08 14:22:52 +05:45
And user " Alice " has sent the following space share invitation:
2024-04-30 12:25:33 +05:45
| space | new-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | <space-role> |
2024-03-13 14:26:37 +05:45
When user " Brian " sends PROPFIND request from the space " new-space " to the resource " folderMain " with depth " 0 " using the WebDAV API
2023-07-12 09:12:34 +02:00
Then the HTTP status code should be " 207 "
2024-10-01 18:07:47 +05:45
And as user " Brian " the PROPFIND response should contain a resource " folderMain " with these key and value pairs:
2023-07-12 09:12:34 +02:00
| key | value |
2024-10-01 12:58:30 +05:45
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %file_id_pattern% |
2023-07-12 09:12:34 +02:00
| oc:name | folderMain |
2024-03-19 09:49:58 +05:45
| oc:permissions | <oc-permission> |
2023-07-12 09:12:34 +02:00
| oc:size | 0 |
Examples:
2024-04-30 12:25:33 +05:45
| space-role | oc-permission |
| Manager | RDNVCKZP |
| Space Editor | DNVCK |
| Space Viewer | |
2023-07-12 09:12:34 +02:00
Scenario Outline: space member with a different role checks the PROPFIND request of the sub-folder in the space
Given user " Alice " has created a folder " folderMain/subFolder1/subFolder2 " in space " new-space "
2024-05-08 14:22:52 +05:45
And user " Alice " has sent the following space share invitation:
2024-04-30 12:25:33 +05:45
| space | new-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | <space-role> |
2024-03-13 14:26:37 +05:45
When user " Brian " sends PROPFIND request from the space " new-space " to the resource " folderMain/subFolder1/subFolder2 " with depth " 0 " using the WebDAV API
2023-07-12 09:12:34 +02:00
Then the HTTP status code should be " 207 "
2024-10-01 18:07:47 +05:45
And as user " Brian " the PROPFIND response should contain a resource " subFolder2 " 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:name | subFolder2 |
| oc:permissions | <oc-permission> |
| oc:size | 0 |
2023-07-12 09:12:34 +02:00
Examples:
2024-04-30 12:25:33 +05:45
| space-role | oc-permission |
| Manager | RDNVCKZP |
| Space Editor | DNVCK |
| Space Viewer | |
2023-07-12 09:12:34 +02:00
Scenario Outline: space member with a different role checks the PROPFIND request of the file in the space
Given user " Alice " has uploaded a file inside space " new-space " with content " some content " to " testfile.txt "
2024-05-08 14:22:52 +05:45
And user " Alice " has sent the following space share invitation:
2024-04-30 12:25:33 +05:45
| space | new-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | <space-role> |
2024-03-13 14:26:37 +05:45
When user " Brian " sends PROPFIND request from the space " new-space " to the resource " testfile.txt " with depth " 0 " using the WebDAV API
2023-07-12 09:12:34 +02:00
Then the HTTP status code should be " 207 "
2024-10-01 18:07:47 +05:45
And as user " Brian " the PROPFIND response should contain a resource " testfile.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:name | testfile.txt |
| oc:permissions | <oc-permission> |
| oc:size | 12 |
2023-07-12 09:12:34 +02:00
Examples:
2024-04-30 12:25:33 +05:45
| space-role | oc-permission |
| Manager | RDNVWZP |
| Space Editor | DNVW |
| Space Viewer | |