From 08922584bca996e32900055e1c454e8f1476e98b Mon Sep 17 00:00:00 2001 From: Saw-jan Date: Tue, 1 Oct 2024 12:58:30 +0545 Subject: [PATCH] test: fix PROPFIND shares space tests --- tests/acceptance/TestHelpers/GraphHelper.php | 14 ++ tests/acceptance/bootstrap/SpacesContext.php | 144 +++++++++--------- .../features/apiContract/propfind.feature | 64 ++++---- .../features/apiContract/sharesReport.feature | 36 ++--- .../features/apiContract/spacesReport.feature | 54 +++---- .../apiContract/spacesSharesReport.feature | 28 ++-- .../features/apiLocks/lockFiles.feature | 18 +-- .../apiSearchContent/extractedProps.feature | 12 +- .../apiSharingNg1/propfindShares.feature | 89 +++-------- .../acceptance/features/apiSpaces/tag.feature | 18 +-- .../propfindByFileId.feature | 12 +- 11 files changed, 229 insertions(+), 260 deletions(-) diff --git a/tests/acceptance/TestHelpers/GraphHelper.php b/tests/acceptance/TestHelpers/GraphHelper.php index e02e8e6344..1024481c4c 100644 --- a/tests/acceptance/TestHelpers/GraphHelper.php +++ b/tests/acceptance/TestHelpers/GraphHelper.php @@ -116,6 +116,7 @@ class GraphHelper { public static function getEtagRegex(): string { return "^\\\"[a-f0-9:.]{1,32}\\\"$"; } + /** * Federated users have a base64 encoded string of {remoteid}@{provider} as their id * This regex matches only non empty base64 encoded strings @@ -126,6 +127,19 @@ class GraphHelper { return '^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$'; } + /** + * @param string $pattern + * + * @return string regex pattern + */ + public static function sanitizeRegexPattern(string $pattern): string { + $pattern = \str_replace("\\\\", "\\", $pattern); + $pattern = \str_replace("/", "\/", $pattern); + $pattern = \preg_replace('/^\^/', '', $pattern); + $pattern = \preg_replace('/\$$/', '', $pattern); + return "/^$pattern$/"; + } + /** * Key name can consist of @@@ * This function separate such key and return its actual value from actual drive response which can be used for assertion diff --git a/tests/acceptance/bootstrap/SpacesContext.php b/tests/acceptance/bootstrap/SpacesContext.php index 9cf94d8608..3cbf0b3967 100644 --- a/tests/acceptance/bootstrap/SpacesContext.php +++ b/tests/acceptance/bootstrap/SpacesContext.php @@ -355,9 +355,11 @@ class SpacesContext implements Context { $this->featureContext->getPasswordForUser($user), ['Depth' => '0'], ); - $responseArray = json_decode(json_encode($this->featureContext->getResponseXml($response)->xpath("//d:response/d:propstat/d:prop/oc:fileid")), true, 512, JSON_THROW_ON_ERROR); - Assert::assertNotEmpty($responseArray, "the PROPFIND response for $folderName is empty"); - return $responseArray[0][0]; + + $this->featureContext->theHttpStatusCodeShouldBe(207, '', $response); + $xmlResponse = $this->featureContext->getResponseXml($response); + $fileId = $xmlResponse->xpath("//d:response/d:propstat/d:prop/oc:fileid")[0]; + return $fileId->__toString(); } /** @@ -3701,9 +3703,8 @@ class SpacesContext implements Context { * @throws GuzzleException */ public function userSendsPropfindRequestFromTheSpaceToTheResourceWithDepthUsingTheWebdavApi(string $user, string $spaceName, string $resource, ?string $folderDepth = "1"): void { - $this->featureContext->setResponse( - $this->sendPropfindRequestToSpace($user, $spaceName, $resource, null, $folderDepth) - ); + $response = $this->sendPropfindRequestToSpace($user, $spaceName, $resource, null, $folderDepth); + $this->featureContext->setResponse($response); } /** @@ -3768,6 +3769,16 @@ class SpacesContext implements Context { 'd:lockdiscovery', 'd:activelock' ]; + + $davPathVersion = $this->featureContext->getDavPathVersion(); + if ($spaceName === 'Shares' && $davPathVersion !== WebDavHelper::DAV_VERSION_SPACES) { + if ($resource === '' || $resource === '/') { + $resource = $spaceName; + } else { + $resource = $spaceName . '/' . $resource; + } + } + return WebDavHelper::propfind( $this->featureContext->getBaseUrl(), $this->featureContext->getActualUsername($user), @@ -3777,34 +3788,18 @@ class SpacesContext implements Context { $this->featureContext->getStepLineRef(), $folderDepth, "files", - $this->featureContext->getDavPathVersion(), + $davPathVersion, null, $headers ); } /** - * @Then /^the "([^"]*)" response should contain a space "([^"]*)" with these key and value pairs:$/ + * @Then /^as user "([^"]*)" the (PROPFIND|REPORT) response should contain a (mountpoint|space) "([^"]*)" with these key and value pairs:$/ * - * @param string $method # method should be either PROPFIND or REPORT - * @param string $space - * @param TableNode $table - * - * @return void - * @throws GuzzleException - * @throws JsonException - */ - public function theResponseShouldContainSpace(string $method, string $space, TableNode $table): void { - $this->featureContext->verifyTableNodeColumns($table, ['key', 'value']); - $this->theResponseShouldContain($method, $this->getSpaceCreator($space), $space, $table); - } - - /** - * @Then /^the "([^"]*)" response to user "([^"]*)" should contain a mountpoint "([^"]*)" with these key and value pairs:$/ - * @Then /^the "([^"]*)" response to user "([^"]*)" should contain a space "([^"]*)" with these key and value pairs:$/ - * - * @param string $method # method should be either PROPFIND or REPORT * @param string $user + * @param string $method # method should be either PROPFIND or REPORT + * @param string $type # type should be either mountpoint or space * @param string $mountPoint * @param TableNode $table * @@ -3812,14 +3807,18 @@ class SpacesContext implements Context { * @throws GuzzleException * @throws JsonException */ - public function theResponseShouldContainMountPoint(string $method, string $user, string $mountPoint, TableNode $table): void { + public function asUsertheXMLResponseShouldContainMountpointWithTheseKeyAndValuePair(string $user, string $method, string $type, string $mountPoint, TableNode $table): void { $this->featureContext->verifyTableNodeColumns($table, ['key', 'value']); - $this->theResponseShouldContain($method, $user, $mountPoint, $table); + if ($this->featureContext->getDavPathVersion() === WebDavHelper::DAV_VERSION_SPACES && $type === 'space') { + $space = $this->getSpaceByName($user, $mountPoint); + $mountPoint = $space['id']; + } else { + $mountPoint = \rawurlencode($mountPoint); + } + $this->theXMLResponseShouldContain($mountPoint, $table); } /** - * @param string $method # method should be either PROPFIND or REPORT - * @param string $user * @param string $spaceNameOrMountPoint # an entity inside a space, or the space name itself * @param TableNode $table * @@ -3827,77 +3826,72 @@ class SpacesContext implements Context { * @throws GuzzleException * @throws JsonException */ - public function theResponseShouldContain(string $method, string $user, string $spaceNameOrMountPoint, TableNode $table): void { - $xmlRes = $this->featureContext->getResponseXml(); + public function theXMLResponseShouldContain(string $spaceNameOrMountPoint, TableNode $table): void { + $xmlResponse = $this->featureContext->getResponseXml(); + $hrefs = array_map(fn($href) => $href->__toString(), $xmlResponse->xpath("//d:response/d:href")); + + $currentHref = ''; + foreach ($hrefs as $href) { + if (\str_ends_with(\rtrim($href, "/"), "/$spaceNameOrMountPoint")) { + $currentHref = $href; + break; + } + } + foreach ($table->getHash() as $row) { - $findItem = $row['key']; - $xmlResponses = $xmlRes->xpath("//d:response/d:propstat/d:prop/$findItem"); + $itemToFind = $row['key']; + $foundXmlItem = $xmlResponse->xpath("//d:href[text()='$currentHref']/following-sibling::d:propstat//$itemToFind"); Assert::assertNotEmpty( - $xmlResponses, - 'The xml response "' . $xmlRes->asXML() . '" did not contain "<' . $findItem . '>" element' + $foundXmlItem, + 'The xml response "' . $xmlResponse->asXML() . '" did not contain "<' . $itemToFind . '>" element' ); - $responseValues = []; - foreach ($xmlResponses as $xmlResponse) { - $responseValues[] = $xmlResponse[0]->__toString(); - } + $actualValue = $foundXmlItem[0]->__toString(); + $expectedValue = $this->featureContext->substituteInLineCodes($row['value']); - $value = str_replace('UUIDof:', '', $row['value']); - switch ($findItem) { + switch ($itemToFind) { case "oc:fileid": - $resourceType = $xmlRes->xpath("//d:response/d:propstat/d:prop/d:getcontenttype")[0]->__toString(); - if ($method === 'PROPFIND') { - if (!$resourceType) { - Assert::assertContainsEquals($this->getResourceId($user, $spaceNameOrMountPoint, $value), $responseValues, 'wrong fileId in the response'); - } else { - Assert::assertContainsEquals($this->getFileId($user, $spaceNameOrMountPoint, $value), $responseValues, 'wrong fileId in the response'); - } - } else { - if ($resourceType === 'httpd/unix-directory') { - Assert::assertContainsEquals($this->getResourceId($user, $spaceNameOrMountPoint, $value), $responseValues, 'wrong fileId in the response'); - } else { - Assert::assertContainsEquals($this->getFileId($user, $spaceNameOrMountPoint, $value), $responseValues, 'wrong fileId in the response'); - } - } + $expectedValue = GraphHelper::sanitizeRegexPattern($expectedValue); + Assert::assertRegExp($expectedValue, $actualValue, 'wrong "fileid" in the response'); break; case "oc:file-parent": - Assert::assertContainsEquals($this->getResourceId($user, $spaceNameOrMountPoint, $value), $responseValues, 'wrong file-parentId in the response'); + $expectedValue = GraphHelper::sanitizeRegexPattern($expectedValue); + Assert::assertRegExp($expectedValue, $actualValue, 'wrong "file-parent" in the response'); break; case "oc:privatelink": - Assert::assertContainsEquals($this->getPrivateLink($user, $spaceNameOrMountPoint), $responseValues, 'cannot find private link for space or resource in the response'); + $expectedValue = GraphHelper::sanitizeRegexPattern($expectedValue); + Assert::assertRegExp($expectedValue, $actualValue, 'wrong "privatelink" in the response'); break; case "oc:tags": // The value should be a comma-separated string of tag names. // We do not care what order they happen to be in, so compare as sorted lists. - $expectedTags = \explode(",", $value); + $expectedTags = \explode(",", $expectedValue); \sort($expectedTags); $expectedTags = \implode(",", $expectedTags); - $actualTags = []; - foreach ($responseValues as $responseValue) { - $responseValue = \explode(",", $responseValue); - \sort($responseValue); - $responseValue = \implode(",", $responseValue); - $actualTags[] = $responseValue; - } - Assert::assertContainsEquals($expectedTags, $actualTags, "wrong $findItem in the response"); + + $actualTags = \explode(",", $actualValue); + \sort($actualTags); + $actualTags = \implode(",", $actualValue); + Assert::assertEquals($expectedTags, $actualTags, "wrong '$itemToFind' in the response"); break; case "d:lockdiscovery/d:activelock/d:timeout": - if ($value === "Infinity") { - Assert::assertContainsEquals($value, $responseValues, "wrong $findItem in the response"); + if ($expectedValue === "Infinity") { + Assert::assertEquals($expectedValue, $actualValue, "wrong '$itemToFind' in the response"); } else { // some time may be required between a lock and propfind request. - $responseValue = explode('-', $responseValues[0]); + $responseValue = explode('-', $actualValue); $responseValue = \intval($responseValue[1]); - $value = explode('-', $value); - $value = \intval($value[1]); - Assert::assertTrue($responseValue >= ($value - 3)); + $expectedValue = explode('-', $expectedValue); + $expectedValue = \intval($expectedValue[1]); + Assert::assertTrue($responseValue >= ($expectedValue - 3)); } break; case "oc:remote-item-id": - Assert::assertContainsEquals($this->getResourceId($user, $spaceNameOrMountPoint, $value), $responseValues, 'wrong remoteItemId in the response'); + $expectedValue = GraphHelper::sanitizeRegexPattern($expectedValue); + Assert::assertRegExp($expectedValue, $actualValue, 'wrong "remote-item-id" in the response'); break; default: - Assert::assertContainsEquals($value, $responseValues, "wrong $findItem in the response"); + Assert::assertEquals($expectedValue, $actualValue, "wrong '$itemToFind' in the response"); break; } } diff --git a/tests/acceptance/features/apiContract/propfind.feature b/tests/acceptance/features/apiContract/propfind.feature index 61c8698854..4c2240d2bf 100644 --- a/tests/acceptance/features/apiContract/propfind.feature +++ b/tests/acceptance/features/apiContract/propfind.feature @@ -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: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: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 | | 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:size | 0 | @@ -85,13 +85,13 @@ Feature: Propfind test | permissionsRole | | 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: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:size | 0 | Examples: | space-role | oc-permission | | Manager | RDNVCKZP | @@ -108,13 +108,13 @@ Feature: Propfind test | permissionsRole | | 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: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:size | 12 | Examples: | space-role | oc-permission | | Manager | RDNVWZP | diff --git a/tests/acceptance/features/apiContract/sharesReport.feature b/tests/acceptance/features/apiContract/sharesReport.feature index d7c8d16603..b115d0a1ee 100644 --- a/tests/acceptance/features/apiContract/sharesReport.feature +++ b/tests/acceptance/features/apiContract/sharesReport.feature @@ -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 | diff --git a/tests/acceptance/features/apiContract/spacesReport.feature b/tests/acceptance/features/apiContract/spacesReport.feature index bf84872d43..93c4493782 100644 --- a/tests/acceptance/features/apiContract/spacesReport.feature +++ b/tests/acceptance/features/apiContract/spacesReport.feature @@ -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 | diff --git a/tests/acceptance/features/apiContract/spacesSharesReport.feature b/tests/acceptance/features/apiContract/spacesSharesReport.feature index 7962a5af22..f3d3af5f3a 100644 --- a/tests/acceptance/features/apiContract/spacesSharesReport.feature +++ b/tests/acceptance/features/apiContract/spacesSharesReport.feature @@ -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 diff --git a/tests/acceptance/features/apiLocks/lockFiles.feature b/tests/acceptance/features/apiLocks/lockFiles.feature index dcb1bab4e9..0612858581 100644 --- a/tests/acceptance/features/apiLocks/lockFiles.feature +++ b/tests/acceptance/features/apiLocks/lockFiles.feature @@ -17,7 +17,7 @@ Feature: lock files Then the HTTP status code should be "200" When user "Alice" sends PROPFIND request from the space "Alice Hansen" to the resource "textfile.txt" with depth "0" using the WebDAV API Then the HTTP status code should be "207" - And the "PROPFIND" response to user "Alice" should contain a space "Alice Hansen" with these key and value pairs: + And as user "Alice" the PROPFIND response should contain a space "Alice Hansen" with these key and value pairs: | key | value | | d:lockdiscovery/d:activelock/d:lockscope/d:exclusive | | | d:lockdiscovery/d:activelock/d:depth | Infinity | @@ -39,7 +39,7 @@ Feature: lock files Then the HTTP status code should be "200" When user "Alice" sends PROPFIND request from the space "Alice Hansen" to the resource "textfile.txt" with depth "0" using the WebDAV API Then the HTTP status code should be "207" - And the "PROPFIND" response to user "Alice" should contain a space "Alice Hansen" with these key and value pairs: + And as user "Alice" the PROPFIND response should contain a space "Alice Hansen" with these key and value pairs: | key | value | | d:lockdiscovery/d:activelock/d:lockscope/d:exclusive | | | d:lockdiscovery/d:activelock/d:depth | Infinity | @@ -61,7 +61,7 @@ Feature: lock files Then the HTTP status code should be "200" When user "Alice" sends PROPFIND request from the space "Alice Hansen" to the resource "textfile.txt" with depth "0" using the WebDAV API Then the HTTP status code should be "207" - And the "PROPFIND" response to user "Alice" should contain a space "Alice Hansen" with these key and value pairs: + And as user "Alice" the PROPFIND response should contain a space "Alice Hansen" with these key and value pairs: | key | value | | d:lockdiscovery/d:activelock/d:lockscope/d:exclusive | | | d:lockdiscovery/d:activelock/d:depth | Infinity | @@ -104,7 +104,7 @@ Feature: lock files Then the HTTP status code should be "200" When user "Brian" sends PROPFIND request from the space "Project" to the resource "textfile.txt" with depth "0" using the WebDAV API Then the HTTP status code should be "207" - And the "PROPFIND" response to user "Brian" should contain a space "Project" with these key and value pairs: + And as user "Brian" the PROPFIND response should contain a space "Alice Hansen" with these key and value pairs: | key | value | | d:lockdiscovery/d:activelock/d:lockscope/d:exclusive | | | d:lockdiscovery/d:activelock/d:depth | Infinity | @@ -133,7 +133,7 @@ Feature: lock files Then the HTTP status code should be "200" When user "Brian" sends PROPFIND request from the space "Project" to the resource "textfile.txt" with depth "0" using the WebDAV API Then the HTTP status code should be "207" - And the "PROPFIND" response to user "Brian" should contain a space "Project" with these key and value pairs: + And as user "Brian" the PROPFIND response should contain a space "Alice Hansen" with these key and value pairs: | key | value | | d:lockdiscovery/d:activelock/d:lockscope/d:exclusive | | | d:lockdiscovery/d:activelock/d:depth | Infinity | @@ -179,7 +179,7 @@ Feature: lock files Then the HTTP status code should be "200" When user "Alice" sends PROPFIND request from the space "Alice Hansen" to the resource "textfile.txt" with depth "0" using the WebDAV API Then the HTTP status code should be "207" - And the "PROPFIND" response to user "Alice" should contain a space "Alice Hansen" with these key and value pairs: + And as user "Alice" the PROPFIND response should contain a space "Alice Hansen" with these key and value pairs: | key | value | | d:lockdiscovery/d:activelock/d:lockscope/d:exclusive | | | d:lockdiscovery/d:activelock/oc:ownername | Brian Murphy | @@ -206,7 +206,7 @@ Feature: lock files Then the HTTP status code should be "200" When user "Alice" sends PROPFIND request from the space "Alice Hansen" to the resource "textfile.txt" with depth "0" using the WebDAV API Then the HTTP status code should be "207" - And the "PROPFIND" response to user "Alice" should contain a space "Alice Hansen" with these key and value pairs: + And as user "Alice" the PROPFIND response should contain a space "Alice Hansen" with these key and value pairs: | key | value | | d:lockdiscovery/d:activelock/d:lockscope/d:exclusive | | | d:lockdiscovery/d:activelock/oc:ownername | Brian Murphy | @@ -253,7 +253,7 @@ Feature: lock files Then the HTTP status code should be "423" When user "Alice" sends PROPFIND request from the space "Alice Hansen" to the resource "textfile.txt" with depth "0" using the WebDAV API Then the HTTP status code should be "207" - And the "PROPFIND" response to user "Alice" should contain a space "Alice Hansen" with these key and value pairs: + And as user "Alice" the PROPFIND response should contain a space "Alice Hansen" with these key and value pairs: | key | value | | d:lockdiscovery/d:activelock/d:lockscope/d:exclusive | | | d:lockdiscovery/d:activelock/oc:ownername | Alice Hansen | @@ -277,7 +277,7 @@ Feature: lock files Then the HTTP status code should be "423" When user "Alice" sends PROPFIND request from the space "Alice Hansen" to the resource "textfile.txt" with depth "0" using the WebDAV API Then the HTTP status code should be "207" - And the "PROPFIND" response to user "Alice" should contain a space "Alice Hansen" with these key and value pairs: + And as user "Alice" the PROPFIND response should contain a space "Alice Hansen" with these key and value pairs: | key | value | | d:lockdiscovery/d:activelock/d:lockscope/d:exclusive | | | d:lockdiscovery/d:activelock/oc:ownername | Brian Murphy | diff --git a/tests/acceptance/features/apiSearchContent/extractedProps.feature b/tests/acceptance/features/apiSearchContent/extractedProps.feature index f2b464e476..3d881be2d6 100644 --- a/tests/acceptance/features/apiSearchContent/extractedProps.feature +++ b/tests/acceptance/features/apiSearchContent/extractedProps.feature @@ -18,7 +18,7 @@ Feature: propfind extracted props | propertyName | | oc:audio | 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 "Alice" the PROPFIND response should contain a space "new-space" with these key and value pairs: | key | value | | oc:audio/oc:album | ALBUM1234567890123456789012345 | | oc:audio/oc:artist | ARTIST123456789012345678901234 | @@ -32,7 +32,7 @@ Feature: propfind extracted props | oc:location | | oc:photo | 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 "Alice" the PROPFIND response should contain a space "new-space" with these key and value pairs: | key | value | | oc:image/oc:width | 640 | | oc:image/oc:height | 480 | @@ -51,7 +51,7 @@ Feature: propfind extracted props | propertyName | | oc:audio | Then the HTTP status code should be "207" - And the "PROPFIND" response to user "Alice" should contain a mountpoint "testaudio.mp3" with these key and value pairs: + And as user "Alice" the PROPFIND response should contain a mountpoint "testaudio.mp3" with these key and value pairs: | key | value | | oc:audio/oc:album | ALBUM1234567890123456789012345 | | oc:audio/oc:artist | ARTIST123456789012345678901234 | @@ -65,7 +65,7 @@ Feature: propfind extracted props | oc:location | | oc:photo | Then the HTTP status code should be "207" - And the "PROPFIND" response to user "Alice" should contain a mountpoint "testavatar.jpg" with these key and value pairs: + And as user "Alice" the PROPFIND response should contain a mountpoint "testavatar.jpg" with these key and value pairs: | key | value | | oc:image/oc:width | 640 | | oc:image/oc:height | 480 | @@ -101,7 +101,7 @@ Feature: propfind extracted props | propertyName | | oc:audio | Then the HTTP status code should be "207" - And the "PROPFIND" response to user "Brian" should contain a space "Shares" with these key and value pairs: + And as user "Brian" the PROPFIND response should contain a space "Shares" with these key and value pairs: | key | value | | oc:audio/oc:album | ALBUM1234567890123456789012345 | | oc:audio/oc:artist | ARTIST123456789012345678901234 | @@ -115,7 +115,7 @@ Feature: propfind extracted props | oc:location | | oc:photo | Then the HTTP status code should be "207" - And the "PROPFIND" response to user "Brian" should contain a space "Shares" with these key and value pairs: + And as user "Brian" the PROPFIND response should contain a space "Shares" with these key and value pairs: | key | value | | oc:image/oc:width | 640 | | oc:image/oc:height | 480 | diff --git a/tests/acceptance/features/apiSharingNg1/propfindShares.feature b/tests/acceptance/features/apiSharingNg1/propfindShares.feature index 93d893e88e..eda789dd52 100644 --- a/tests/acceptance/features/apiSharingNg1/propfindShares.feature +++ b/tests/acceptance/features/apiSharingNg1/propfindShares.feature @@ -10,47 +10,8 @@ Feature: propfind a shares | Brian | | Carol | - @issue-4421 + @issue-4421 @issue-9933 Scenario Outline: sharee PROPFIND same name shares shared by multiple users - Given using spaces DAV path - And user "Alice" has uploaded file with content "to share" to "textfile.txt" - And user "Alice" has created folder "folderToShare" - And user "Carol" has uploaded file with content "to share" to "textfile.txt" - And user "Carol" has created folder "folderToShare" - And user "Alice" has sent the following resource share invitation: - | resource | | - | space | Personal | - | sharee | Brian | - | shareType | user | - | permissionsRole | Viewer | - And user "Brian" has a share "" synced - And user "Carol" has sent the following resource share invitation: - | resource | | - | space | Personal | - | sharee | Brian | - | shareType | user | - | permissionsRole | Viewer | - And user "Brian" has a share "" synced - When user "Brian" sends PROPFIND request to space "Shares" using the WebDAV API - Then the HTTP status code should be "207" - And the "PROPFIND" response to user "Brian" should contain a space "Shares" with these key and value pairs: - | key | value | - | oc:fileid | UUIDof:Shares | - And the "PROPFIND" response to user "Brian" should contain a mountpoint "Shares" with these key and value pairs: - | key | value | - | oc:name | | - | oc:permissions | S | - And the "PROPFIND" response to user "Brian" should contain a mountpoint "Shares" with these key and value pairs: - | key | value | - | oc:name | | - | oc:permissions | S | - Examples: - | resource | resource-2 | - | textfile.txt | textfile (1).txt | - | folderToShare | folderToShare (1) | - - @issue-4421 @issue-9933 @skip - Scenario Outline: sharee PROPFIND same name shares shared by multiple users using new dav path Given using DAV path And user "Alice" has uploaded file with content "to share" to "textfile.txt" And user "Alice" has created folder "folderToShare" @@ -70,22 +31,22 @@ Feature: propfind a shares | shareType | user | | permissionsRole | Viewer | And user "Brian" has a share "" synced - When user "Brian" sends PROPFIND request from the space "Shares" to the resource "Shares" using the WebDAV API + 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 the "PROPFIND" response to user "Brian" should contain a space "Shares" with these key and value pairs: - | key | value | - | oc:fileid | UUIDof:Shares | - | oc:name | Shares | - And the "PROPFIND" response to user "Brian" should contain a mountpoint "Shares" with these key and value pairs: + And as user "Brian" the PROPFIND response should contain a space "Shares" with these key and value pairs: + | key | value | + | oc:fileid | %file_id_pattern% | + | oc:name | Shares | + And as user "Brian" the PROPFIND response should contain a mountpoint "" with these key and value pairs: | key | value | - | oc:fileid | UUIDof: | + | oc:fileid | %file_id_pattern% | | oc:name | | | oc:permissions | S | - And the "PROPFIND" response to user "Brian" should contain a mountpoint "Shares" with these key and value pairs: - | key | value | - | oc:fileid | UUIDof: | - | oc:name | | - | oc:permissions | S | + And as user "Brian" the PROPFIND response should contain a mountpoint "" with these key and value pairs: + | key | value | + | oc:fileid | %file_id_pattern% | + | oc:name | | + | oc:permissions | S | Examples: | dav-path-version | resource | resource-2 | | old | textfile.txt | textfile (1).txt | @@ -93,8 +54,8 @@ Feature: propfind a shares | new | textfile.txt | textfile (1).txt | | new | folderToShare | folderToShare (1) | - @issue-4421 @issue-9933 @skip - Scenario: sharee PROPFIND shares with bracket in the name + @issue-4421 @issue-9933 + Scenario: sharee PROPFIND a share having bracket in the name Given using spaces DAV path And user "Alice" has created folder "folderToShare" And user "Alice" has uploaded file with content "to share" to "folderToShare/textfile.txt" @@ -116,16 +77,16 @@ Feature: propfind a shares And user "Brian" has a share "folderToShare (1)" synced When user "Brian" sends PROPFIND request from the space "Shares" to the resource "folderToShare (1)" using the WebDAV API Then the HTTP status code should be "207" - And the "PROPFIND" response to user "Brian" should contain a mountpoint "folderToShare (1)" with these key and value pairs: - | key | value | - | oc:fileid | UUIDof:folderToShare (1) | - | oc:name | folderToShare | - | oc:permissions | S | - And the "PROPFIND" response to user "Brian" should contain a mountpoint "folderToShare (1)" with these key and value pairs: - | key | value | - | oc:fileid | UUIDof:textfile.txt | - | oc:name | textfile.txt | - | oc:permissions | S | + And as user "Brian" the PROPFIND response should contain a mountpoint "folderToShare (1)" with these key and value pairs: + | key | value | + | oc:fileid | %share_id_pattern% | + | oc:name | folderToShare | + | oc:permissions | S | + And as user "Brian" the PROPFIND response should contain a mountpoint "textfile.txt" with these key and value pairs: + | key | value | + | oc:fileid | %file_id_pattern% | + | oc:name | textfile.txt | + | oc:permissions | | Scenario Outline: check file-id from PROPFIND with shared-with-me drive-item-id diff --git a/tests/acceptance/features/apiSpaces/tag.feature b/tests/acceptance/features/apiSpaces/tag.feature index 57a64210ff..e6c104c423 100644 --- a/tests/acceptance/features/apiSpaces/tag.feature +++ b/tests/acceptance/features/apiSpaces/tag.feature @@ -30,7 +30,7 @@ Feature: Tag Then the HTTP status code should be "200" When user "Alice" sends PROPFIND request from the space "use-tag" 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 "use-tag" with these key and value pairs: + And as user "Alice" the PROPFIND response should contain a space "use-tag" with these key and value pairs: | key | value | | oc:tags | tag level#1,tag with symbols @^$#^%$@%!_+) | When user "Alice" creates the following tags for file "folderMain/insideTheFolder.txt" of space "use-tag": @@ -38,7 +38,7 @@ Feature: Tag Then the HTTP status code should be "200" When user "Brian" sends PROPFIND request from the space "use-tag" to the resource "folderMain/insideTheFolder.txt" with depth "0" using the WebDAV API Then the HTTP status code should be "207" - And the "PROPFIND" response should contain a space "use-tag" with these key and value pairs: + And as user "Alice" the PROPFIND response should contain a space "use-tag" with these key and value pairs: | key | value | | oc:tags | fileTag | When user "Alice" lists all available tags via the Graph API @@ -68,12 +68,12 @@ Feature: Tag Then the HTTP status code should be "200" When user "Alice" sends PROPFIND request from the space "Alice Hansen" to the resource "folderMain" with depth "0" using the WebDAV API Then the HTTP status code should be "207" - And the "PROPFIND" response to user "Alice" should contain a mountpoint "Alice Hansen" with these key and value pairs: + And as user "Alice" the PROPFIND response should contain a mountpoint "folderMain" with these key and value pairs: | key | value | | oc:tags | my tag,important | When user "Alice" sends PROPFIND request from the space "Alice Hansen" to the resource "file.txt" with depth "0" using the WebDAV API Then the HTTP status code should be "207" - And the "PROPFIND" response to user "Alice" should contain a mountpoint "Alice Hansen" with these key and value pairs: + And as user "Alice" the PROPFIND response should contain a mountpoint "file.txt" with these key and value pairs: | key | value | | oc:tags | fileTag,tag with symbol @^$#^%$@%!_+) | When user "Alice" lists all available tags via the Graph API @@ -188,7 +188,7 @@ Feature: Tag | marketing | And user "Alice" sends PROPFIND request from the space "use-tag" 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 "use-tag" with these key and value pairs: + And as user "Alice" the PROPFIND response should contain a space "use-tag" with these key and value pairs: | key | value | | oc:tags | development | @@ -268,7 +268,7 @@ Feature: Tag Then the HTTP status code should be "200" When user "Alice" sends PROPFIND request from the space "use-tag" 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 "use-tag" with these key and value pairs: + And as user "Alice" the PROPFIND response should contain a space "use-tag" with these key and value pairs: | key | value | | oc:tags | finance,नेपाल | When user "Alice" creates the following tags for file "folderMain/insideTheFolder.txt" of space "use-tag": @@ -276,7 +276,7 @@ Feature: Tag Then the HTTP status code should be "200" When user "Brian" sends PROPFIND request from the space "use-tag" to the resource "folderMain/insideTheFolder.txt" with depth "0" using the WebDAV API Then the HTTP status code should be "207" - And the "PROPFIND" response should contain a space "use-tag" with these key and value pairs: + And as user "Alice" the PROPFIND response should contain a space "use-tag" with these key and value pairs: | key | value | | oc:tags | file,नेपाल,Tag | When user "Alice" lists all available tags via the Graph API @@ -295,8 +295,8 @@ Feature: Tag | engineering,finance,qa | Then the HTTP status code should be "200" When user "Alice" sends PROPFIND request from the space "use-tag" 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 "use-tag" with these key and value pairs: + Then the HTTP status code should be "207": + And as user "Alice" the PROPFIND response should contain a space "use-tag" with these key and value pairs: | key | value | | oc:tags | engineering,finance,hr,qa | When user "Alice" lists all available tags via the Graph API diff --git a/tests/acceptance/features/apiSpacesDavOperation/propfindByFileId.feature b/tests/acceptance/features/apiSpacesDavOperation/propfindByFileId.feature index 4ed42c17d9..c2e0f33479 100644 --- a/tests/acceptance/features/apiSpacesDavOperation/propfindByFileId.feature +++ b/tests/acceptance/features/apiSpacesDavOperation/propfindByFileId.feature @@ -13,7 +13,7 @@ Feature: propfind a file using file id And we save it into "FILEID" When user "Alice" sends HTTP method "PROPFIND" to URL "" Then the HTTP status code should be "207" - And the "PROPFIND" response to user "Alice" should contain a mountpoint "Alice Hansen" with these key and value pairs: + And as user "Alice" the PROPFIND response should contain a mountpoint "textfile.txt" with these key and value pairs: | key | value | | oc:name | textfile.txt | | oc:permissions | RDNVWZP | @@ -29,7 +29,7 @@ Feature: propfind a file using file id And we save it into "FILEID" When user "Alice" sends HTTP method "PROPFIND" to URL "" Then the HTTP status code should be "207" - And the "PROPFIND" response to user "Alice" should contain a mountpoint "Alice Hansen" with these key and value pairs: + And as user "Alice" the PROPFIND response should contain a mountpoint "textfile.txt" with these key and value pairs: | key | value | | oc:name | textfile.txt | | oc:permissions | RDNVWZP | @@ -58,7 +58,7 @@ Feature: propfind a file using file id And we save it into "FILEID" When user "Alice" sends HTTP method "PROPFIND" to URL "" 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 "Alice" the PROPFIND response should contain a mountpoint "textfile.txt" with these key and value pairs: | key | value | | oc:name | textfile.txt | | oc:permissions | RDNVWZP | @@ -76,7 +76,7 @@ Feature: propfind a file using file id And we save it into "FILEID" When user "Alice" sends HTTP method "PROPFIND" to URL "" 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 "Alice" the PROPFIND response should contain a mountpoint "textfile.txt" with these key and value pairs: | key | value | | oc:name | textfile.txt | | oc:permissions | RDNVWZP | @@ -113,7 +113,7 @@ Feature: propfind a file using file id And user "Brian" has a share "textfile.txt" synced When user "Brian" sends HTTP method "PROPFIND" to URL "" Then the HTTP status code should be "207" - And the "PROPFIND" response to user "Alice" should contain a mountpoint "Brian Murphy" with these key and value pairs: + And as user "Brian" the PROPFIND response should contain a mountpoint "textfile.txt" with these key and value pairs: | key | value | | oc:name | textfile.txt | | oc:permissions | SNVW | @@ -137,7 +137,7 @@ Feature: propfind a file using file id And we save it into "FILEID" When user "Brian" sends HTTP method "PROPFIND" to URL "" Then the HTTP status code should be "207" - And the "PROPFIND" response to user "Alice" should contain a mountpoint "Brian Murphy" with these key and value pairs: + And as user "Brian" the PROPFIND response should contain a mountpoint "textfile.txt" with these key and value pairs: | key | value | | oc:name | textfile.txt | | oc:permissions | DNVW |