Merge pull request #10218 from owncloud/tests/propfind-shares-fileid

[tests-only][full-ci] add test coverage for #9933
This commit is contained in:
Sawjan Gurung authored and GitHub committed 2024-10-02 17:13:19 +05:45
commit 99e808282d
2 files changed
+36 -2

No files matched your search

+2 -1
View File
@@ -3816,7 +3816,8 @@ class SpacesContext implements Context {
// When using file-id, some characters need to be encoded
$resource = \str_replace("!", "%21", $resource);
} else {
$resource = \rawurlencode($resource);
$encodedPaths = \array_map(fn ($path) => \rawurlencode($path), \explode("/", $resource));
$resource = \join("/", $encodedPaths);
}
$this->theXMLResponseShouldContain($resource, $table->getHash());
}
@@ -88,7 +88,7 @@ Feature: propfind a shares
| oc:name | textfile.txt |
| oc:permissions | |
@issue-8420
Scenario Outline: check file-id from PROPFIND with shared-with-me drive-item-id
Given using spaces DAV path
And user "Alice" has uploaded file with content "to share" to "/textfile1.txt"
@@ -107,3 +107,36 @@ Feature: propfind a shares
| resource |
| textfile1.txt |
| folderToShare |
@issue-9933
Scenario Outline: check file-id of different PROPFIND requests to shared items
Given using <dav-path-version> DAV path
And user "Alice" has created folder "folderToShare"
And user "Alice" has uploaded file with content "lorem epsum" to "folderToShare/textfile.txt"
And user "Alice" has sent the following resource share invitation:
| resource | folderToShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "folderToShare" synced
When user "Brian" sends PROPFIND request from the space "Shares" to the resource "/" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" the PROPFIND response should contain a resource "folderToShare" with these key and value pairs:
| key | value |
| oc:fileid | <pattern> |
When user "Brian" sends PROPFIND request from the space "Shares" to the resource "folderToShare" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" the PROPFIND response should contain a resource "folderToShare" with these key and value pairs:
| key | value |
| oc:fileid | <pattern> |
When user "Brian" sends PROPFIND request from the space "Shares" to the resource "folderToShare/textfile.txt" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" the PROPFIND response should contain a resource "folderToShare/textfile.txt" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
Examples:
| dav-path-version | pattern |
| old | %file_id_pattern% |
| new | %file_id_pattern% |
| spaces | %share_id_pattern% |