add remote item id to search report tests scenario

This commit is contained in:
ishabaral
2024-07-11 09:58:47 +05:45
parent cc12fdc9c4
commit 5b566e2b43
3 changed files with 22 additions and 15 deletions
@@ -26,13 +26,14 @@ Feature: REPORT request to Shares space
And the following headers should match these regular expressions And the following headers should match these regular expressions
| X-Request-Id | /^[a-zA-Z]+\/[a-zA-Z]+\.feature:\d+(-\d+)?$/ | | 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 the "REPORT" response to user "Brian" should contain a mountpoint "folderMain" with these key and value pairs:
| key | value | | key | value |
| oc:fileid | UUIDof:SubFolder1 | | oc:fileid | UUIDof:SubFolder1 |
| oc:file-parent | UUIDof:folderMain | | oc:file-parent | UUIDof:folderMain |
| oc:shareroot | /folderMain | | oc:shareroot | /folderMain |
| oc:name | SubFolder1 | | oc:name | SubFolder1 |
| d:getcontenttype | httpd/unix-directory | | d:getcontenttype | httpd/unix-directory |
| oc:permissions | S | | oc:permissions | S |
| oc:remote-item-id | UUIDof:folderMain |
Examples: Examples:
| dav-path-version | | dav-path-version |
| old | | old |
@@ -55,6 +56,7 @@ Feature: REPORT request to Shares space
| d:getcontenttype | text/plain | | d:getcontenttype | text/plain |
| oc:permissions | S | | oc:permissions | S |
| d:getcontentlength | 34 | | d:getcontentlength | 34 |
| oc:remote-item-id | UUIDof:folderMain |
Examples: Examples:
| dav-path-version | | dav-path-version |
| old | | old |
@@ -31,14 +31,15 @@ Feature: Report test
And the following headers should match these regular expressions And the following headers should match these regular expressions
| X-Request-Id | /^[a-zA-Z]+\/[a-zA-Z]+\.feature:\d+(-\d+)?$/ | | 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 the "REPORT" response to user "Brian" should contain a mountpoint "folderMain" with these key and value pairs:
| key | value | | key | value |
| oc:fileid | UUIDof:SubFolder1 | | oc:fileid | UUIDof:SubFolder1 |
| oc:file-parent | UUIDof:folderMain | | oc:file-parent | UUIDof:folderMain |
| oc:shareroot | /folderMain | | oc:shareroot | /folderMain |
| oc:name | SubFolder1 | | oc:name | SubFolder1 |
| d:getcontenttype | httpd/unix-directory | | d:getcontenttype | httpd/unix-directory |
| oc:permissions | S | | oc:permissions | S |
| oc:size | 12 | | oc:size | 12 |
| oc:remote-item-id | UUIDof:folderMain |
Scenario: check the response of the found file Scenario: check the response of the found file
@@ -61,6 +62,7 @@ Feature: Report test
| d:getcontenttype | text/plain | | d:getcontenttype | text/plain |
| oc:permissions | SD | | oc:permissions | SD |
| d:getcontentlength | 12 | | d:getcontentlength | 12 |
| oc:remote-item-id | UUIDof:folderMain |
Scenario: search for the shared folder when the share is not accepted Scenario: search for the shared folder when the share is not accepted
@@ -3893,6 +3893,9 @@ class SpacesContext implements Context {
Assert::assertTrue($responseValue >= ($value - 3)); Assert::assertTrue($responseValue >= ($value - 3));
} }
break; break;
case "oc:remote-item-id":
Assert::assertContainsEquals($this->getResourceId($user, $spaceNameOrMountPoint, $value), $responseValues, 'wrong remoteItemId in the response');
break;
default: default:
Assert::assertContainsEquals($value, $responseValues, "wrong $findItem in the response"); Assert::assertContainsEquals($value, $responseValues, "wrong $findItem in the response");
break; break;