test: fix PROPFIND shares space tests

This commit is contained in:
Saw-jan
2024-10-02 13:33:33 +05:45
parent 7da40861c0
commit 08922584bc
11 changed files with 229 additions and 260 deletions
@@ -19,13 +19,13 @@ Feature: Propfind test
Then the HTTP status code should be "207"
And the following headers should match these regular expressions
| X-Request-Id | /^[a-zA-Z]+\/[a-zA-Z]+\.feature:\d+(-\d+)?$/ |
And the "PROPFIND" response should contain a space "new-space" with these key and value pairs:
| key | value |
| oc:fileid | UUIDof:new-space |
| oc:name | new-space |
| oc:permissions | RDNVCKZP |
| oc:privatelink | |
| oc:size | 12 |
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 |
Scenario Outline: space member with a different role checks the PROPFIND request of a space
@@ -39,14 +39,14 @@ Feature: Propfind test
Then the HTTP status code should be "207"
And the following headers should match these regular expressions
| X-Request-Id | /^[a-zA-Z]+\/[a-zA-Z]+\.feature:\d+(-\d+)?$/ |
And the "PROPFIND" response should contain a space "new-space" with these key and value pairs:
| key | value |
| oc:fileid | UUIDof:new-space |
| oc:name | new-space |
| oc:permissions | <oc-permission> |
| oc:privatelink | |
| oc:size | 12 |
Examples:
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 |
Examples:
| space-role | oc-permission |
| Manager | RDNVCKZP |
| Space Editor | DNVCK |
@@ -62,10 +62,10 @@ Feature: Propfind test
| permissionsRole | <space-role> |
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"
And the "PROPFIND" response should contain a space "new-space" with these key and value pairs:
And as user "Brian" the PROPFIND response should contain a mountpoint "folderMain" with these key and value pairs:
| key | value |
| oc:fileid | UUIDof:folderMain |
| oc:file-parent | UUIDof:new-space |
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %file_id_pattern% |
| oc:name | folderMain |
| oc:permissions | <oc-permission> |
| oc:size | 0 |
@@ -85,13 +85,13 @@ Feature: Propfind test
| permissionsRole | <space-role> |
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"
And the "PROPFIND" response should contain a space "new-space" with these key and value pairs:
| key | value |
| oc:fileid | UUIDof:folderMain/subFolder1/subFolder2 |
| oc:file-parent | UUIDof:folderMain/subFolder1 |
| oc:name | subFolder2 |
| oc:permissions | <oc-permission> |
| oc:size | 0 |
And as user "Brian" the PROPFIND response should contain a mountpoint "subFolder2" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %file_id_pattern% |
| oc:name | subFolder2 |
| oc:permissions | <oc-permission> |
| oc:size | 0 |
Examples:
| space-role | oc-permission |
| Manager | RDNVCKZP |
@@ -108,13 +108,13 @@ Feature: Propfind test
| permissionsRole | <space-role> |
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"
And the "PROPFIND" response should contain a space "new-space" with these key and value pairs:
| key | value |
| oc:fileid | UUIDof:testfile.txt |
| oc:file-parent | UUIDof:new-space |
| oc:name | testfile.txt |
| oc:permissions | <oc-permission> |
| oc:size | 12 |
And as user "Brian" the PROPFIND response should contain a mountpoint "testfile.txt" with these key and value pairs:
| 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:
| space-role | oc-permission |
| Manager | RDNVWZP |
@@ -26,15 +26,15 @@ Feature: REPORT request to Shares space
Then the HTTP status code should be "207"
And the following headers should match these regular expressions
| X-Request-Id | /^[a-zA-Z]+\/[a-zA-Z]+\.feature:\d+(-\d+)?$/ |
And the "REPORT" response to user "Brian" should contain a mountpoint "folderMain" with these key and value pairs:
And as user "Brian" the REPORT response should contain a mountpoint "SubFolder1" with these key and value pairs:
| key | value |
| oc:fileid | UUIDof:SubFolder1 |
| oc:file-parent | UUIDof:folderMain |
| 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 |
| oc:remote-item-id | UUIDof:folderMain |
| oc:remote-item-id | %file_id_pattern% |
Examples:
| dav-path-version |
| old |
@@ -48,16 +48,16 @@ Feature: REPORT request to Shares space
Then the HTTP status code should be "207"
And the following headers should match these regular expressions
| X-Request-Id | /^[a-zA-Z]+\/[a-zA-Z]+\.feature:\d+(-\d+)?$/ |
And the "REPORT" response to user "Brian" should contain a mountpoint "folderMain" with these key and value pairs:
| key | value |
| oc:fileid | UUIDof:SubFolder1/subFOLDER2/frodo.txt |
| oc:file-parent | UUIDof:SubFolder1/subFOLDER2 |
| oc:shareroot | /folderMain |
| oc:name | frodo.txt |
| d:getcontenttype | text/plain |
| oc:permissions | S |
| d:getcontentlength | 34 |
| oc:remote-item-id | UUIDof:folderMain |
And as user "Brian" the REPORT response should contain a mountpoint "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% |
Examples:
| dav-path-version |
| old |
@@ -100,19 +100,19 @@ Feature: REPORT request to Shares space
Then the HTTP status code should be "207"
And the following headers should match these regular expressions
| X-Request-Id | /^[a-zA-Z]+\/[a-zA-Z]+\.feature:\d+(-\d+)?$/ |
And the "REPORT" response to user "Brian" should contain a mountpoint "secureFolder" with these key and value pairs:
And as user "Brian" the REPORT response should contain a mountpoint "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 |
| oc:remote-item-id | UUIDof:secureFolder |
| oc:remote-item-id | %file_id_pattern% |
When user "Brian" searches for "secure.txt" using the WebDAV API
And the following headers should match these regular expressions
| X-Request-Id | /^[a-zA-Z]+\/[a-zA-Z]+\.feature:\d+(-\d+)?$/ |
Then the HTTP status code should be "207"
And the "REPORT" response to user "Brian" should contain a mountpoint "secureFolder" with these key and value pairs:
And as user "Brian" the REPORT response should contain a mountpoint "secure.txt" with these key and value pairs:
| key | value |
| oc:shareroot | /secureFolder |
| oc:name | secure.txt |
@@ -140,7 +140,7 @@ Feature: REPORT request to Shares space
Then the HTTP status code should be "207"
And the following headers should match these regular expressions
| X-Request-Id | /^[a-zA-Z]+\/[a-zA-Z]+\.feature:\d+(-\d+)?$/ |
And the "REPORT" response to user "Brian" should contain a mountpoint "secure.txt" with these key and value pairs:
And as user "Brian" the REPORT response should contain a mountpoint "secure.txt" with these key and value pairs:
| key | value |
| oc:shareroot | /secure.txt |
| oc:name | secure.txt |
@@ -22,14 +22,14 @@ Feature: REPORT request to project space
| /testFile.txt |
And the following headers should match these regular expressions
| X-Request-Id | /^[a-zA-Z]+\/[a-zA-Z]+\.feature:\d+(-\d+)?$/ |
And the "REPORT" response to user "Alice" should contain a mountpoint "findData" with these key and value pairs:
| key | value |
| oc:fileid | UUIDof:testFile.txt |
| oc:file-parent | UUIDof:findData |
| oc:name | testFile.txt |
| d:getcontenttype | text/plain |
| oc:permissions | RDNVW |
| d:getcontentlength | 12 |
And as user "Alice" the REPORT response should contain a mountpoint "findData" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %file_id_pattern% |
| oc:name | testFile.txt |
| d:getcontenttype | text/plain |
| oc:permissions | RDNVW |
| d:getcontentlength | 12 |
Scenario: check the response of the searched sub-file
@@ -42,14 +42,14 @@ Feature: REPORT request to project space
| /folderMain/SubFolder1/subFOLDER2/insideTheFolder.txt |
And the following headers should match these regular expressions
| X-Request-Id | /^[a-zA-Z]+\/[a-zA-Z]+\.feature:\d+(-\d+)?$/ |
And the "REPORT" response to user "Alice" should contain a mountpoint "findData" with these key and value pairs:
| key | value |
| oc:fileid | UUIDof:folderMain/SubFolder1/subFOLDER2/insideTheFolder.txt |
| oc:file-parent | UUIDof:folderMain/SubFolder1/subFOLDER2 |
| oc:name | insideTheFolder.txt |
| d:getcontenttype | text/plain |
| oc:permissions | RDNVW |
| d:getcontentlength | 12 |
And as user "Alice" the REPORT response should contain a mountpoint "findData" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %file_id_pattern% |
| oc:name | insideTheFolder.txt |
| d:getcontenttype | text/plain |
| oc:permissions | RDNVW |
| d:getcontentlength | 12 |
Scenario: check the response of the searched folder
@@ -61,10 +61,10 @@ Feature: REPORT request to project space
| /folderMain |
And the following headers should match these regular expressions
| X-Request-Id | /^[a-zA-Z]+\/[a-zA-Z]+\.feature:\d+(-\d+)?$/ |
And the "REPORT" response to user "Alice" should contain a mountpoint "findData" with these key and value pairs:
And as user "Alice" the REPORT response should contain a mountpoint "findData" with these key and value pairs:
| key | value |
| oc:fileid | UUIDof:folderMain |
| oc:file-parent | UUIDof:findData |
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %file_id_pattern% |
| oc:name | folderMain |
| d:getcontenttype | httpd/unix-directory |
| oc:permissions | RDNVCK |
@@ -81,11 +81,11 @@ Feature: REPORT request to project space
And the following headers should match these regular expressions
| X-Request-Id | /^[a-zA-Z]+\/[a-zA-Z]+\.feature:\d+(-\d+)?$/ |
And the HTTP status code should be "207"
And the "REPORT" response to user "Alice" should contain a mountpoint "findData" with these key and value pairs:
| key | value |
| oc:fileid | UUIDof:folderMain/sub-folder |
| oc:file-parent | UUIDof:folderMain |
| oc:name | sub-folder |
| d:getcontenttype | httpd/unix-directory |
| oc:permissions | RDNVCK |
| oc:size | 0 |
And as user "Alice" the REPORT response should contain a mountpoint "findData" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %file_id_pattern% |
| oc:name | sub-folder |
| d:getcontenttype | httpd/unix-directory |
| oc:permissions | RDNVCK |
| oc:size | 0 |
@@ -31,16 +31,16 @@ Feature: Report test
Then the HTTP status code should be "207"
And the following headers should match these regular expressions
| X-Request-Id | /^[a-zA-Z]+\/[a-zA-Z]+\.feature:\d+(-\d+)?$/ |
And the "REPORT" response to user "Brian" should contain a mountpoint "folderMain" with these key and value pairs:
And as user "Brian" the REPORT response should contain a mountpoint "folderMain" with these key and value pairs:
| key | value |
| oc:fileid | UUIDof:SubFolder1 |
| oc:file-parent | UUIDof:folderMain |
| 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 |
| oc:size | 12 |
| oc:remote-item-id | UUIDof:folderMain |
| oc:remote-item-id | %file_id_pattern% |
Scenario: check the response of the found file
@@ -55,16 +55,16 @@ Feature: Report test
Then the HTTP status code should be "207"
And the following headers should match these regular expressions
| X-Request-Id | /^[a-zA-Z]+\/[a-zA-Z]+\.feature:\d+(-\d+)?$/ |
And the "REPORT" response to user "Brian" should contain a mountpoint "folderMain" with these key and value pairs:
| key | value |
| oc:fileid | UUIDof:SubFolder1/subFOLDER2/insideTheFolder.txt |
| oc:file-parent | UUIDof:SubFolder1/subFOLDER2 |
| oc:shareroot | /folderMain |
| oc:name | insideTheFolder.txt |
| d:getcontenttype | text/plain |
| oc:permissions | SD |
| d:getcontentlength | 12 |
| oc:remote-item-id | UUIDof:folderMain |
And as user "Brian" the REPORT response should contain a mountpoint "insideTheFolder.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 | insideTheFolder.txt |
| d:getcontenttype | text/plain |
| oc:permissions | SD |
| d:getcontentlength | 12 |
| oc:remote-item-id | %file_id_pattern% |
Scenario: search for the shared folder when the share is not accepted