test: rename PROPFIND response check steps

test: fix tests
This commit is contained in:
Saw-jan
2024-10-01 18:07:47 +05:45
parent 08922584bc
commit 732f2b241e
15 changed files with 124 additions and 108 deletions

View File

@@ -29,7 +29,6 @@ use Psr\Http\Message\ResponseInterface;
* A helper class for managing wopi requests
*/
class CollaborationHelper {
/**
* @param string $fileId
* @param string $app

View File

@@ -132,7 +132,7 @@ class GraphHelper {
*
* @return string regex pattern
*/
public static function sanitizeRegexPattern(string $pattern): string {
public static function jsonSchemaRegexToPureRegex(string $pattern): string {
$pattern = \str_replace("\\\\", "\\", $pattern);
$pattern = \str_replace("/", "\/", $pattern);
$pattern = \preg_replace('/^\^/', '', $pattern);

View File

@@ -665,4 +665,22 @@ class HttpRequestHelper {
public static function getJsonDecodedResponseBodyContent(ResponseInterface $response): mixed {
return json_decode($response->getBody()->getContents(), null, 512, JSON_THROW_ON_ERROR);
}
/**
* @return bool
*/
public static function sendScenarioLineReferencesInXRequestId(): bool {
return (\getenv("SEND_SCENARIO_LINE_REFERENCES") === "true");
}
/**
* @return bool
*/
public static function getXRequestIdRegex(): string {
if (self::sendScenarioLineReferencesInXRequestId()) {
return '/^[a-zA-Z]+\/[a-zA-Z]+\.feature:\d+(-\d+)?$/';
}
$host = gethostname();
return "/^$host\/.*$/";
}
}

View File

@@ -145,8 +145,6 @@ class FeatureContext extends BehatVariablesContext {
* in the apiComments suite.
*/
private string $stepLineRef = '';
private bool $sendStepLineRef = false;
private bool $sendStepLineRefHasBeenChecked = false;
/**
* @var boolean true if TEST_SERVER_FED_URL is defined
@@ -416,17 +414,6 @@ class FeatureContext extends BehatVariablesContext {
return (\getenv("TEST_WITH_LDAP") === "true");
}
/**
* @return bool
*/
public function sendScenarioLineReferencesInXRequestId(): ?bool {
if ($this->sendStepLineRefHasBeenChecked === false) {
$this->sendStepLineRef = (\getenv("SEND_SCENARIO_LINE_REFERENCES") === "true");
$this->sendStepLineRefHasBeenChecked = true;
}
return $this->sendStepLineRef;
}
/**
* @return bool
*/
@@ -880,7 +867,7 @@ class FeatureContext extends BehatVariablesContext {
* @return string
*/
public function getStepLineRef(): string {
if (!$this->sendStepLineRef) {
if (!HttpRequestHelper::sendScenarioLineReferencesInXRequestId()) {
return '';
}
@@ -2435,6 +2422,14 @@ class FeatureContext extends BehatVariablesContext {
"getUUIDv4Regex"
],
"parameter" => []
],
[
"code" => "%request_id_pattern%",
"function" => [
__NAMESPACE__ . '\TestHelpers\HttpRequestHelper',
"getXRequestIdRegex"
],
"parameter" => []
]
];
if ($user !== null) {
@@ -2522,11 +2517,15 @@ class FeatureContext extends BehatVariablesContext {
$substitution["function"],
$substitution["parameter"]
);
foreach ($functions as $function => $parameters) {
$replacement = \call_user_func_array(
$function,
\array_merge([$replacement], $parameters)
);
// do not run functions on regex patterns
if (!\str_ends_with($value, "_pattern%")) {
foreach ($functions as $function => $parameters) {
$replacement = \call_user_func_array(
$function,
\array_merge([$replacement], $parameters)
);
}
}
$value = \str_replace(
$substitution["code"],
@@ -2644,7 +2643,7 @@ class FeatureContext extends BehatVariablesContext {
$environment->registerContext($this->spacesContext);
}
if ($this->sendScenarioLineReferencesInXRequestId()) {
if (HttpRequestHelper::sendScenarioLineReferencesInXRequestId()) {
$this->scenarioString = $suiteName . '/' . $featureFileName . ':' . $scenarioLine;
} else {
$this->scenarioString = '';
@@ -2678,7 +2677,7 @@ class FeatureContext extends BehatVariablesContext {
* @return void
*/
public function beforeEachStep(BeforeStepScope $scope): void {
if ($this->sendScenarioLineReferencesInXRequestId()) {
if (HttpRequestHelper::sendScenarioLineReferencesInXRequestId()) {
$this->stepLineRef = $this->scenarioString . '-' . $scope->getStep()->getLine();
} else {
$this->stepLineRef = '';

View File

@@ -3775,7 +3775,7 @@ class SpacesContext implements Context {
if ($resource === '' || $resource === '/') {
$resource = $spaceName;
} else {
$resource = $spaceName . '/' . $resource;
$resource = "$spaceName/$resource";
}
}
@@ -3795,44 +3795,44 @@ class SpacesContext implements Context {
}
/**
* @Then /^as user "([^"]*)" the (PROPFIND|REPORT) response should contain a (mountpoint|space) "([^"]*)" with these key and value pairs:$/
* @Then /^as user "([^"]*)" the (PROPFIND|REPORT) response should contain a (resource|space) "([^"]*)" with these key and value pairs:$/
*
* @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 string $type # type should be either resource or space
* @param string $resource
* @param TableNode $table
*
* @return void
* @throws GuzzleException
* @throws JsonException
*/
public function asUsertheXMLResponseShouldContainMountpointWithTheseKeyAndValuePair(string $user, string $method, string $type, string $mountPoint, TableNode $table): void {
public function asUsertheXMLResponseShouldContainMountpointWithTheseKeyAndValuePair(string $user, string $method, string $type, string $resource, TableNode $table): void {
$this->featureContext->verifyTableNodeColumns($table, ['key', 'value']);
if ($this->featureContext->getDavPathVersion() === WebDavHelper::DAV_VERSION_SPACES && $type === 'space') {
$space = $this->getSpaceByName($user, $mountPoint);
$mountPoint = $space['id'];
$space = $this->getSpaceByName($user, $resource);
$resource = $space['id'];
} else {
$mountPoint = \rawurlencode($mountPoint);
$resource = \rawurlencode($resource);
}
$this->theXMLResponseShouldContain($mountPoint, $table);
$this->theXMLResponseShouldContain($resource, $table);
}
/**
* @param string $spaceNameOrMountPoint # an entity inside a space, or the space name itself
* @param string $resource
* @param TableNode $table
*
* @return void
* @throws GuzzleException
* @throws JsonException
*/
public function theXMLResponseShouldContain(string $spaceNameOrMountPoint, TableNode $table): void {
public function theXMLResponseShouldContain(string $resource, TableNode $table): void {
$xmlResponse = $this->featureContext->getResponseXml();
$hrefs = array_map(fn($href) => $href->__toString(), $xmlResponse->xpath("//d:response/d:href"));
$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")) {
if (\str_ends_with(\rtrim($href, "/"), "/$resource")) {
$currentHref = $href;
break;
}
@@ -3851,15 +3851,15 @@ class SpacesContext implements Context {
switch ($itemToFind) {
case "oc:fileid":
$expectedValue = GraphHelper::sanitizeRegexPattern($expectedValue);
$expectedValue = GraphHelper::jsonSchemaRegexToPureRegex($expectedValue);
Assert::assertRegExp($expectedValue, $actualValue, 'wrong "fileid" in the response');
break;
case "oc:file-parent":
$expectedValue = GraphHelper::sanitizeRegexPattern($expectedValue);
$expectedValue = GraphHelper::jsonSchemaRegexToPureRegex($expectedValue);
Assert::assertRegExp($expectedValue, $actualValue, 'wrong "file-parent" in the response');
break;
case "oc:privatelink":
$expectedValue = GraphHelper::sanitizeRegexPattern($expectedValue);
$expectedValue = GraphHelper::jsonSchemaRegexToPureRegex($expectedValue);
Assert::assertRegExp($expectedValue, $actualValue, 'wrong "privatelink" in the response');
break;
case "oc:tags":
@@ -3871,7 +3871,7 @@ class SpacesContext implements Context {
$actualTags = \explode(",", $actualValue);
\sort($actualTags);
$actualTags = \implode(",", $actualValue);
$actualTags = \implode(",", $actualTags);
Assert::assertEquals($expectedTags, $actualTags, "wrong '$itemToFind' in the response");
break;
case "d:lockdiscovery/d:activelock/d:timeout":
@@ -3887,7 +3887,7 @@ class SpacesContext implements Context {
}
break;
case "oc:remote-item-id":
$expectedValue = GraphHelper::sanitizeRegexPattern($expectedValue);
$expectedValue = GraphHelper::jsonSchemaRegexToPureRegex($expectedValue);
Assert::assertRegExp($expectedValue, $actualValue, 'wrong "remote-item-id" in the response');
break;
default:

View File

@@ -21,7 +21,7 @@ Feature: Copy test
| Origin | %base_url% |
Then the HTTP status code should be "201"
And the following headers should match these regular expressions
| Oc-Fileid | /^[a-f0-9!\$\-]{110}$/ |
| Access-Control-Allow-Origin | /^%base_url%$/ |
| X-Request-Id | /^[a-zA-Z]+\/[a-zA-Z]+\.feature:\d+(-\d+)?$/ |
| Oc-Fileid | /^[a-f0-9!\$\-]{110}$/ |
| Access-Control-Allow-Origin | /^%base_url%$/ |
| X-Request-Id | %request_id_pattern% |

View File

@@ -18,7 +18,7 @@ Feature: Propfind test
When user "Alice" sends PROPFIND request to space "new-space" with depth "0" using the WebDAV API
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+)?$/ |
| X-Request-Id | %request_id_pattern% |
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% |
@@ -38,7 +38,7 @@ Feature: Propfind test
When user "Brian" sends PROPFIND request to space "new-space" with depth "0" using the WebDAV API
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+)?$/ |
| X-Request-Id | %request_id_pattern% |
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% |
@@ -46,7 +46,7 @@ Feature: Propfind test
| oc:permissions | <oc-permission> |
| oc:privatelink | %base_url%/f/[0-9a-z-$%]+ |
| oc:size | 12 |
Examples:
Examples:
| space-role | oc-permission |
| Manager | RDNVCKZP |
| Space Editor | DNVCK |
@@ -62,7 +62,7 @@ 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 as user "Brian" the PROPFIND response should contain a mountpoint "folderMain" with these key and value pairs:
And as user "Brian" the PROPFIND response should contain a resource "folderMain" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %file_id_pattern% |
@@ -85,7 +85,7 @@ 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 as user "Brian" the PROPFIND response should contain a mountpoint "subFolder2" with these key and value pairs:
And as user "Brian" the PROPFIND response should contain a resource "subFolder2" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %file_id_pattern% |
@@ -108,7 +108,7 @@ 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 as user "Brian" the PROPFIND response should contain a mountpoint "testfile.txt" with these key and value pairs:
And as user "Brian" the PROPFIND response should contain a resource "testfile.txt" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %file_id_pattern% |

View File

@@ -25,8 +25,8 @@ Feature: REPORT request to Shares space
When user "Brian" searches for "SubFolder1" using the WebDAV API
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 as user "Brian" the REPORT response should contain a mountpoint "SubFolder1" with these key and value pairs:
| X-Request-Id | %request_id_pattern% |
And as user "Brian" the REPORT response should contain a resource "SubFolder1" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %file_id_pattern% |
@@ -47,8 +47,8 @@ Feature: REPORT request to Shares space
When user "Brian" searches for "frodo.txt" using the WebDAV API
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 as user "Brian" the REPORT response should contain a mountpoint "frodo.txt" with these key and value pairs:
| X-Request-Id | %request_id_pattern% |
And as user "Brian" the REPORT response should contain a resource "frodo.txt" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %file_id_pattern% |
@@ -77,7 +77,7 @@ Feature: REPORT request to Shares space
When user "Brian" searches for "folderToBrian" using the WebDAV API
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+)?$/ |
| X-Request-Id | %request_id_pattern% |
And the search result should contain "0" entries
Examples:
| dav-path-version |
@@ -99,8 +99,8 @@ Feature: REPORT request to Shares space
When user "Brian" searches for "secureFolder" using the WebDAV API
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 as user "Brian" the REPORT response should contain a mountpoint "secureFolder" with these key and value pairs:
| X-Request-Id | %request_id_pattern% |
And as user "Brian" the REPORT response should contain a resource "secureFolder" with these key and value pairs:
| key | value |
| oc:shareroot | /secureFolder |
| oc:name | secureFolder |
@@ -110,9 +110,9 @@ Feature: REPORT request to Shares space
| 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+)?$/ |
| X-Request-Id | %request_id_pattern% |
Then the HTTP status code should be "207"
And as user "Brian" the REPORT response should contain a mountpoint "secure.txt" with these key and value pairs:
And as user "Brian" the REPORT response should contain a resource "secure.txt" with these key and value pairs:
| key | value |
| oc:shareroot | /secureFolder |
| oc:name | secure.txt |
@@ -139,8 +139,8 @@ Feature: REPORT request to Shares space
When user "Brian" searches for "secure.txt" using the WebDAV API
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 as user "Brian" the REPORT response should contain a mountpoint "secure.txt" with these key and value pairs:
| X-Request-Id | %request_id_pattern% |
And as user "Brian" the REPORT response should contain a resource "secure.txt" with these key and value pairs:
| key | value |
| oc:shareroot | /secure.txt |
| oc:name | secure.txt |

View File

@@ -21,8 +21,8 @@ Feature: REPORT request to project space
And the search result of user "Alice" should contain only these entries:
| /testFile.txt |
And the following headers should match these regular expressions
| X-Request-Id | /^[a-zA-Z]+\/[a-zA-Z]+\.feature:\d+(-\d+)?$/ |
And as user "Alice" the REPORT response should contain a mountpoint "findData" with these key and value pairs:
| X-Request-Id | %request_id_pattern% |
And as user "Alice" the REPORT response should contain a resource "testFile.txt" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %file_id_pattern% |
@@ -41,8 +41,8 @@ Feature: REPORT request to project space
And the search result of user "Alice" should contain only these entries:
| /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 as user "Alice" the REPORT response should contain a mountpoint "findData" with these key and value pairs:
| X-Request-Id | %request_id_pattern% |
And as user "Alice" the REPORT response should contain a resource "insideTheFolder.txt" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %file_id_pattern% |
@@ -60,8 +60,8 @@ Feature: REPORT request to project space
And the search result of user "Alice" should contain only these entries:
| /folderMain |
And the following headers should match these regular expressions
| X-Request-Id | /^[a-zA-Z]+\/[a-zA-Z]+\.feature:\d+(-\d+)?$/ |
And as user "Alice" the REPORT response should contain a mountpoint "findData" with these key and value pairs:
| X-Request-Id | %request_id_pattern% |
And as user "Alice" the REPORT response should contain a resource "folderMain" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %file_id_pattern% |
@@ -79,9 +79,9 @@ Feature: REPORT request to project space
And the search result of user "Alice" should contain only these entries:
| /folderMain/sub-folder |
And the following headers should match these regular expressions
| X-Request-Id | /^[a-zA-Z]+\/[a-zA-Z]+\.feature:\d+(-\d+)?$/ |
| X-Request-Id | %request_id_pattern% |
And the HTTP status code should be "207"
And as user "Alice" the REPORT response should contain a mountpoint "findData" with these key and value pairs:
And as user "Alice" the REPORT response should contain a resource "sub-folder" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %file_id_pattern% |

View File

@@ -30,8 +30,8 @@ Feature: Report test
When user "Brian" searches for "SubFolder1" using the WebDAV API
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 as user "Brian" the REPORT response should contain a mountpoint "folderMain" with these key and value pairs:
| X-Request-Id | %request_id_pattern% |
And as user "Brian" the REPORT response should contain a resource "SubFolder1" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %file_id_pattern% |
@@ -54,8 +54,8 @@ Feature: Report test
When user "Brian" searches for "insideTheFolder.txt" using the WebDAV API
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 as user "Brian" the REPORT response should contain a mountpoint "insideTheFolder.txt" with these key and value pairs:
| X-Request-Id | %request_id_pattern% |
And as user "Brian" the REPORT response should contain a resource "insideTheFolder.txt" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %file_id_pattern% |
@@ -78,5 +78,5 @@ Feature: Report test
When user "Brian" searches for "folderMain" using the WebDAV API
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+)?$/ |
| X-Request-Id | %request_id_pattern% |
And the search result should contain "0" entries

View File

@@ -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 as user "Alice" the PROPFIND response should contain a space "Alice Hansen" with these key and value pairs:
And as user "Alice" the PROPFIND response should contain a resource "textfile.txt" 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 as user "Alice" the PROPFIND response should contain a space "Alice Hansen" with these key and value pairs:
And as user "Alice" the PROPFIND response should contain a resource "textfile.txt" 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 as user "Alice" the PROPFIND response should contain a space "Alice Hansen" with these key and value pairs:
And as user "Alice" the PROPFIND response should contain a resource "textfile.txt" 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 as user "Brian" the PROPFIND response should contain a space "Alice Hansen" with these key and value pairs:
And as user "Brian" the PROPFIND response should contain a resource "textfile.txt" 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 as user "Brian" the PROPFIND response should contain a space "Alice Hansen" with these key and value pairs:
And as user "Brian" the PROPFIND response should contain a resource "textfile.txt" 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 as user "Alice" the PROPFIND response should contain a space "Alice Hansen" with these key and value pairs:
And as user "Alice" the PROPFIND response should contain a resource "textfile.txt" 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 as user "Alice" the PROPFIND response should contain a space "Alice Hansen" with these key and value pairs:
And as user "Alice" the PROPFIND response should contain a resource "textfile.txt" 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 as user "Alice" the PROPFIND response should contain a space "Alice Hansen" with these key and value pairs:
And as user "Alice" the PROPFIND response should contain a resource "textfile.txt" 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 as user "Alice" the PROPFIND response should contain a space "Alice Hansen" with these key and value pairs:
And as user "Alice" the PROPFIND response should contain a resource "textfile.txt" with these key and value pairs:
| key | value |
| d:lockdiscovery/d:activelock/d:lockscope/d:exclusive | |
| d:lockdiscovery/d:activelock/oc:ownername | Brian Murphy |

View File

@@ -18,7 +18,7 @@ Feature: propfind extracted props
| propertyName |
| oc:audio |
Then the HTTP status code should be "207"
And as user "Alice" the PROPFIND response should contain a space "new-space" with these key and value pairs:
And as user "Alice" the REPORT response should contain a resource "testaudio.mp3" 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 as user "Alice" the PROPFIND response should contain a space "new-space" with these key and value pairs:
And as user "Alice" the REPORT response should contain a resource "testavatar.jpg" 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 as user "Alice" the PROPFIND response should contain a mountpoint "testaudio.mp3" with these key and value pairs:
And as user "Alice" the REPORT response should contain a resource "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 as user "Alice" the PROPFIND response should contain a mountpoint "testavatar.jpg" with these key and value pairs:
And as user "Alice" the REPORT response should contain a resource "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 as user "Brian" the PROPFIND response should contain a space "Shares" with these key and value pairs:
And as user "Brian" the REPORT response should contain a resource "testaudio.mp3" 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 as user "Brian" the PROPFIND response should contain a space "Shares" with these key and value pairs:
And as user "Brian" the REPORT response should contain a resource "testavatar.jpg" with these key and value pairs:
| key | value |
| oc:image/oc:width | 640 |
| oc:image/oc:height | 480 |

View File

@@ -37,12 +37,12 @@ Feature: propfind a shares
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:name | Shares |
And as user "Brian" the PROPFIND response should contain a mountpoint "<resource>" with these key and value pairs:
And as user "Brian" the PROPFIND response should contain a resource "<resource>" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:name | <resource> |
| oc:permissions | S |
And as user "Brian" the PROPFIND response should contain a mountpoint "<resource-2>" with these key and value pairs:
And as user "Brian" the PROPFIND response should contain a resource "<resource-2>" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:name | <resource-2> |
@@ -77,12 +77,12 @@ 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 as user "Brian" the PROPFIND response should contain a mountpoint "folderToShare (1)" with these key and value pairs:
And as user "Brian" the PROPFIND response should contain a resource "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:
And as user "Brian" the PROPFIND response should contain a resource "textfile.txt" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:name | textfile.txt |

View File

@@ -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 as user "Alice" 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 resource "folderMain" 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 as user "Alice" 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 resource "insideTheFolder.txt" 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 as user "Alice" the PROPFIND response should contain a mountpoint "folderMain" with these key and value pairs:
And as user "Alice" the PROPFIND response should contain a resource "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 as user "Alice" the PROPFIND response should contain a mountpoint "file.txt" with these key and value pairs:
And as user "Alice" the PROPFIND response should contain a resource "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 as user "Alice" 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 resource "folderMain" 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 as user "Alice" 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 resource "folderMain" 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 as user "Alice" 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 resource "insideTheFolder.txt" 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 as user "Alice" 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 resource "folderMain" 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

View File

@@ -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 "<dav-path>"
Then the HTTP status code should be "207"
And as user "Alice" the PROPFIND response should contain a mountpoint "textfile.txt" with these key and value pairs:
And as user "Alice" the PROPFIND response should contain a resource "<<FILEID>>" 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 "<dav-path>"
Then the HTTP status code should be "207"
And as user "Alice" the PROPFIND response should contain a mountpoint "textfile.txt" with these key and value pairs:
And as user "Alice" the PROPFIND response should contain a resource "<<FILEID>>" 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 "<dav-path>"
Then the HTTP status code should be "207"
And as user "Alice" the PROPFIND response should contain a mountpoint "textfile.txt" with these key and value pairs:
And as user "Alice" the PROPFIND response should contain a resource "<<FILEID>>" 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 "<dav-path>"
Then the HTTP status code should be "207"
And as user "Alice" the PROPFIND response should contain a mountpoint "textfile.txt" with these key and value pairs:
And as user "Alice" the PROPFIND response should contain a resource "<<FILEID>>" 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 "<dav-path>"
Then the HTTP status code should be "207"
And as user "Brian" the PROPFIND response should contain a mountpoint "textfile.txt" with these key and value pairs:
And as user "Brian" the PROPFIND response should contain a resource "<<FILEID>>" 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 "<dav-path>"
Then the HTTP status code should be "207"
And as user "Brian" the PROPFIND response should contain a mountpoint "textfile.txt" with these key and value pairs:
And as user "Brian" the PROPFIND response should contain a resource "<<FILEID>>" with these key and value pairs:
| key | value |
| oc:name | textfile.txt |
| oc:permissions | DNVW |