From 5b566e2b439427f26ff3c6fa686ffe149ba49021 Mon Sep 17 00:00:00 2001 From: ishabaral Date: Tue, 9 Jul 2024 17:06:32 +0545 Subject: [PATCH] add remote item id to search report tests scenario --- .../features/apiContract/sharesReport.feature | 16 +++++++++------- .../apiContract/spacesSharesReport.feature | 18 ++++++++++-------- .../features/bootstrap/SpacesContext.php | 3 +++ 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/tests/acceptance/features/apiContract/sharesReport.feature b/tests/acceptance/features/apiContract/sharesReport.feature index 8d989b22d3..ba6190ccc7 100644 --- a/tests/acceptance/features/apiContract/sharesReport.feature +++ b/tests/acceptance/features/apiContract/sharesReport.feature @@ -26,13 +26,14 @@ Feature: REPORT request to Shares space 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 | - | oc:file-parent | UUIDof:folderMain | - | oc:shareroot | /folderMain | - | oc:name | SubFolder1 | - | d:getcontenttype | httpd/unix-directory | - | oc:permissions | S | + | key | value | + | oc:fileid | UUIDof:SubFolder1 | + | oc:file-parent | UUIDof:folderMain | + | oc:shareroot | /folderMain | + | oc:name | SubFolder1 | + | d:getcontenttype | httpd/unix-directory | + | oc:permissions | S | + | oc:remote-item-id | UUIDof:folderMain | Examples: | dav-path-version | | old | @@ -55,6 +56,7 @@ Feature: REPORT request to Shares space | d:getcontenttype | text/plain | | oc:permissions | S | | d:getcontentlength | 34 | + | oc:remote-item-id | UUIDof:folderMain | Examples: | dav-path-version | | old | diff --git a/tests/acceptance/features/apiContract/spacesSharesReport.feature b/tests/acceptance/features/apiContract/spacesSharesReport.feature index 69adf32add..e3698a2042 100644 --- a/tests/acceptance/features/apiContract/spacesSharesReport.feature +++ b/tests/acceptance/features/apiContract/spacesSharesReport.feature @@ -31,14 +31,15 @@ Feature: Report test 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 | - | oc:file-parent | UUIDof:folderMain | - | oc:shareroot | /folderMain | - | oc:name | SubFolder1 | - | d:getcontenttype | httpd/unix-directory | - | oc:permissions | S | - | oc:size | 12 | + | key | value | + | oc:fileid | UUIDof:SubFolder1 | + | oc:file-parent | UUIDof:folderMain | + | oc:shareroot | /folderMain | + | oc:name | SubFolder1 | + | d:getcontenttype | httpd/unix-directory | + | oc:permissions | S | + | oc:size | 12 | + | oc:remote-item-id | UUIDof:folderMain | Scenario: check the response of the found file @@ -61,6 +62,7 @@ Feature: Report test | d:getcontenttype | text/plain | | oc:permissions | SD | | d:getcontentlength | 12 | + | oc:remote-item-id | UUIDof:folderMain | Scenario: search for the shared folder when the share is not accepted diff --git a/tests/acceptance/features/bootstrap/SpacesContext.php b/tests/acceptance/features/bootstrap/SpacesContext.php index e139c05a93..2fc6c581d1 100644 --- a/tests/acceptance/features/bootstrap/SpacesContext.php +++ b/tests/acceptance/features/bootstrap/SpacesContext.php @@ -3893,6 +3893,9 @@ class SpacesContext implements Context { Assert::assertTrue($responseValue >= ($value - 3)); } break; + case "oc:remote-item-id": + Assert::assertContainsEquals($this->getResourceId($user, $spaceNameOrMountPoint, $value), $responseValues, 'wrong remoteItemId in the response'); + break; default: Assert::assertContainsEquals($value, $responseValues, "wrong $findItem in the response"); break;