Files

122 lines
6.1 KiB
Gherkin
Raw Permalink Normal View History

2022-11-28 14:27:41 +05:45
Feature: Propfind test
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:
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
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
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"
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"
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"
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 | |
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"
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
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:
| key | value |
2024-10-01 12:58:30 +05:45
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %file_id_pattern% |
| oc:name | folderMain |
| oc:permissions | <oc-permission> |
| oc:size | 0 |
Examples:
2024-04-30 12:25:33 +05:45
| space-role | oc-permission |
| Manager | RDNVCKZP |
| Space Editor | DNVCK |
| Space Viewer | |
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"
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
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 |
Examples:
2024-04-30 12:25:33 +05:45
| space-role | oc-permission |
| Manager | RDNVCKZP |
| Space Editor | DNVCK |
| Space Viewer | |
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"
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
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 |
Examples:
2024-04-30 12:25:33 +05:45
| space-role | oc-permission |
| Manager | RDNVWZP |
| Space Editor | DNVW |
| Space Viewer | |