mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-08 13:19:58 -06:00
Merge pull request #10205 from owncloud/tests/fix-shares-propfind
[tests-only][full-ci] fix shares propfind tests
This commit is contained in:
@@ -29,7 +29,6 @@ use Psr\Http\Message\ResponseInterface;
|
||||
* A helper class for managing wopi requests
|
||||
*/
|
||||
class CollaborationHelper {
|
||||
|
||||
/**
|
||||
* @param string $fileId
|
||||
* @param string $app
|
||||
|
||||
@@ -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 jsonSchemaRegexToPureRegex(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
|
||||
|
||||
@@ -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 string
|
||||
*/
|
||||
public static function getXRequestIdRegex(): string {
|
||||
if (self::sendScenarioLineReferencesInXRequestId()) {
|
||||
return '/^[a-zA-Z]+\/[a-zA-Z]+\.feature:\d+(-\d+)?$/';
|
||||
}
|
||||
$host = gethostname();
|
||||
return "/^$host\/.*$/";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 = '';
|
||||
|
||||
@@ -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,17 @@ class SpacesContext implements Context {
|
||||
'd:lockdiscovery',
|
||||
'd:activelock'
|
||||
];
|
||||
|
||||
$davPathVersion = $this->featureContext->getDavPathVersion();
|
||||
if ($spaceName === 'Shares' && $davPathVersion !== WebDavHelper::DAV_VERSION_SPACES) {
|
||||
// for old/new dav paths, append the Shares space path
|
||||
if ($resource === '' || $resource === '/') {
|
||||
$resource = $spaceName;
|
||||
} else {
|
||||
$resource = "$spaceName/$resource";
|
||||
}
|
||||
}
|
||||
|
||||
return WebDavHelper::propfind(
|
||||
$this->featureContext->getBaseUrl(),
|
||||
$this->featureContext->getActualUsername($user),
|
||||
@@ -3777,127 +3789,150 @@ 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 (resource|space) "([^"]*)" with these key and value pairs:$/
|
||||
*
|
||||
* @param string $method # method should be either PROPFIND or REPORT
|
||||
* @param string $space
|
||||
* @param string $user
|
||||
* @param string $type # type should be either resource or space
|
||||
* @param string $resource
|
||||
* @param TableNode $table
|
||||
*
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function theResponseShouldContainSpace(string $method, string $space, TableNode $table): void {
|
||||
public function asUsertheXMLResponseShouldContainMountpointWithTheseKeyAndValuePair(string $user, string $type, string $resource, TableNode $table): void {
|
||||
$this->featureContext->verifyTableNodeColumns($table, ['key', 'value']);
|
||||
$this->theResponseShouldContain($method, $this->getSpaceCreator($space), $space, $table);
|
||||
if ($this->featureContext->getDavPathVersion() === WebDavHelper::DAV_VERSION_SPACES && $type === 'space') {
|
||||
$space = $this->getSpaceByName($user, $resource);
|
||||
$resource = $space['id'];
|
||||
} elseif (\preg_match(GraphHelper::jsonSchemaRegexToPureRegex(GraphHelper::getFileIdRegex()), $resource)) {
|
||||
// When using file-id, some characters need to be encoded
|
||||
$resource = \str_replace("!", "%21", $resource);
|
||||
} else {
|
||||
$resource = \rawurlencode($resource);
|
||||
}
|
||||
$this->theXMLResponseShouldContain($resource, $table->getHash());
|
||||
}
|
||||
|
||||
/**
|
||||
* @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 $mountPoint
|
||||
* @param TableNode $table
|
||||
* @param string $resource // can be resource name, space id or file id
|
||||
* @param array $properties // ["key" => "value"]
|
||||
*
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function theResponseShouldContainMountPoint(string $method, string $user, string $mountPoint, TableNode $table): void {
|
||||
$this->featureContext->verifyTableNodeColumns($table, ['key', 'value']);
|
||||
$this->theResponseShouldContain($method, $user, $mountPoint, $table);
|
||||
}
|
||||
public function theXMLResponseShouldContain(string $resource, array $properties): void {
|
||||
$xmlResponse = $this->featureContext->getResponseXml();
|
||||
$hrefs = array_map(fn ($href) => $href->__toString(), $xmlResponse->xpath("//d:response/d:href"));
|
||||
|
||||
/**
|
||||
* @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
|
||||
*
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function theResponseShouldContain(string $method, string $user, string $spaceNameOrMountPoint, TableNode $table): void {
|
||||
$xmlRes = $this->featureContext->getResponseXml();
|
||||
foreach ($table->getHash() as $row) {
|
||||
$findItem = $row['key'];
|
||||
$xmlResponses = $xmlRes->xpath("//d:response/d:propstat/d:prop/$findItem");
|
||||
Assert::assertNotEmpty(
|
||||
$xmlResponses,
|
||||
'The xml response "' . $xmlRes->asXML() . '" did not contain "<' . $findItem . '>" element'
|
||||
);
|
||||
$currentHref = '';
|
||||
foreach ($hrefs as $href) {
|
||||
if (\str_ends_with(\rtrim($href, "/"), "/$resource")) {
|
||||
$currentHref = $href;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$responseValues = [];
|
||||
foreach ($xmlResponses as $xmlResponse) {
|
||||
$responseValues[] = $xmlResponse[0]->__toString();
|
||||
foreach ($properties as $property) {
|
||||
$itemToFind = $property['key'];
|
||||
|
||||
// if href is not found, build xpath using oc:name
|
||||
$xpaths = [];
|
||||
if (!$currentHref) {
|
||||
$decodedResource = \urldecode($resource);
|
||||
if ($property['key'] === 'oc:name') {
|
||||
$xpath = "//oc:name[text()='$decodedResource']";
|
||||
} elseif (\array_key_exists('oc:shareroot', $properties)) {
|
||||
$xpaths[] = "//oc:name[text()='$resource']/preceding-sibling::oc:shareroot[text()='" . $properties['oc:shareroot'] . "'/preceding-sibling::/";
|
||||
$xpaths[] = "//oc:name[text()='$resource']/preceding-sibling::oc:shareroot[text()='" . $properties['oc:shareroot'] . "'/following-sibling::/";
|
||||
$xpaths[] = "//oc:name[text()='$resource']/following-sibling::oc:shareroot[text()='" . $properties['oc:shareroot'] . "'/preceding-sibling::/";
|
||||
$xpaths[] = "//oc:name[text()='$resource']/following-sibling::oc:shareroot[text()='" . $properties['oc:shareroot'] . "'/following-sibling::/";
|
||||
} else {
|
||||
$xpaths[] = "//oc:name[text()='$decodedResource']/preceding-sibling::";
|
||||
$xpaths[] = "//oc:name[text()='$decodedResource']/following-sibling::";
|
||||
}
|
||||
} else {
|
||||
$xpath = "//d:href[text()='$currentHref']/following-sibling::d:propstat//$itemToFind";
|
||||
}
|
||||
|
||||
$value = str_replace('UUIDof:', '', $row['value']);
|
||||
switch ($findItem) {
|
||||
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');
|
||||
}
|
||||
if (\count($xpaths)) {
|
||||
// check every xpath
|
||||
foreach ($xpaths as $key => $path) {
|
||||
$xpath = "{$path}{$itemToFind}";
|
||||
$foundXmlItem = $xmlResponse->xpath($xpath);
|
||||
$xpaths[$key] = $xpath;
|
||||
if (\count($foundXmlItem)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$foundXmlItem = $xmlResponse->xpath($xpath);
|
||||
$xpaths[] = $xpath;
|
||||
}
|
||||
|
||||
Assert::assertNotEmpty(
|
||||
$foundXmlItem,
|
||||
// all these for the sake of a nice error message
|
||||
"Using xpaths:\n\t- " . \join("\n\t- ", $xpaths)
|
||||
. "\n"
|
||||
. "Could not find '<$itemToFind>' element in the XML response\n\t"
|
||||
. "'" . \trim($xmlResponse->asXML()) . "'"
|
||||
);
|
||||
|
||||
$actualValue = $foundXmlItem[0]->__toString();
|
||||
$expectedValue = $this->featureContext->substituteInLineCodes($property['value']);
|
||||
|
||||
switch ($itemToFind) {
|
||||
case "oc:fileid":
|
||||
$expectedValue = GraphHelper::jsonSchemaRegexToPureRegex($expectedValue);
|
||||
Assert::assertMatchesRegularExpression($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::jsonSchemaRegexToPureRegex($expectedValue);
|
||||
Assert::assertMatchesRegularExpression($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::jsonSchemaRegexToPureRegex($expectedValue);
|
||||
Assert::assertMatchesRegularExpression($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(",", $actualTags);
|
||||
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::jsonSchemaRegexToPureRegex($expectedValue);
|
||||
Assert::assertMatchesRegularExpression($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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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% |
|
||||
|
||||
|
||||
@@ -18,14 +18,14 @@ 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+)?$/ |
|
||||
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 |
|
||||
| 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% |
|
||||
| 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
|
||||
@@ -38,14 +38,14 @@ 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+)?$/ |
|
||||
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-permission> |
|
||||
| oc:privatelink | |
|
||||
| oc:size | 12 |
|
||||
| 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% |
|
||||
| oc:name | new-space |
|
||||
| oc:permissions | <oc-permission> |
|
||||
| oc:privatelink | %base_url%/f/[0-9a-z-$%]+ |
|
||||
| oc:size | 12 |
|
||||
Examples:
|
||||
| space-role | oc-permission |
|
||||
| Manager | RDNVCKZP |
|
||||
@@ -62,10 +62,10 @@ 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 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 resource "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-permission> |
|
||||
| oc:size | 0 |
|
||||
@@ -85,13 +85,13 @@ 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 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-permission> |
|
||||
| oc:size | 0 |
|
||||
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% |
|
||||
| oc:name | subFolder2 |
|
||||
| oc:permissions | <oc-permission> |
|
||||
| oc:size | 0 |
|
||||
Examples:
|
||||
| space-role | oc-permission |
|
||||
| Manager | RDNVCKZP |
|
||||
@@ -108,13 +108,13 @@ 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 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-permission> |
|
||||
| oc:size | 12 |
|
||||
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% |
|
||||
| oc:name | testfile.txt |
|
||||
| oc:permissions | <oc-permission> |
|
||||
| oc:size | 12 |
|
||||
Examples:
|
||||
| space-role | oc-permission |
|
||||
| Manager | RDNVWZP |
|
||||
|
||||
@@ -25,16 +25,16 @@ 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 the "REPORT" response to user "Brian" 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 | 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 |
|
||||
@@ -47,17 +47,17 @@ 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 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 |
|
||||
| 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% |
|
||||
| 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 |
|
||||
@@ -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,20 +99,20 @@ 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 the "REPORT" response to user "Brian" 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 |
|
||||
| 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+)?$/ |
|
||||
| X-Request-Id | %request_id_pattern% |
|
||||
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 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 the "REPORT" response to user "Brian" 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 |
|
||||
|
||||
@@ -21,15 +21,15 @@ 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 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 |
|
||||
| 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% |
|
||||
| oc:name | testFile.txt |
|
||||
| d:getcontenttype | text/plain |
|
||||
| oc:permissions | RDNVW |
|
||||
| d:getcontentlength | 12 |
|
||||
|
||||
|
||||
Scenario: check the response of the searched sub-file
|
||||
@@ -41,15 +41,15 @@ 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 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 |
|
||||
| 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% |
|
||||
| oc:name | insideTheFolder.txt |
|
||||
| d:getcontenttype | text/plain |
|
||||
| oc:permissions | RDNVW |
|
||||
| d:getcontentlength | 12 |
|
||||
|
||||
|
||||
Scenario: check the response of the searched folder
|
||||
@@ -60,11 +60,11 @@ 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 the "REPORT" response to user "Alice" 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 | 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 |
|
||||
@@ -79,13 +79,13 @@ 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 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 resource "sub-folder" 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 |
|
||||
|
||||
@@ -30,17 +30,17 @@ 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 the "REPORT" response to user "Brian" 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 | 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
|
||||
@@ -54,17 +54,17 @@ 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 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 |
|
||||
| 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% |
|
||||
| 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
|
||||
@@ -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
|
||||
|
||||
@@ -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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 |
|
||||
|
||||
@@ -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 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 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 the "PROPFIND" response to user "Alice" 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 the "PROPFIND" response to user "Alice" 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 the "PROPFIND" response to user "Brian" 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 the "PROPFIND" response to user "Brian" 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 |
|
||||
|
||||
@@ -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 | <resource> |
|
||||
| space | Personal |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | Viewer |
|
||||
And user "Brian" has a share "<resource>" synced
|
||||
And user "Carol" has sent the following resource share invitation:
|
||||
| resource | <resource> |
|
||||
| space | Personal |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | Viewer |
|
||||
And user "Brian" has a share "<resource-2>" 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 | <resource> |
|
||||
| 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 | <resource-2> |
|
||||
| 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-version> 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 "<resource-2>" 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 resource "<resource>" with these key and value pairs:
|
||||
| key | value |
|
||||
| oc:fileid | UUIDof:<resource> |
|
||||
| oc:fileid | %file_id_pattern% |
|
||||
| oc:name | <resource> |
|
||||
| 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:<resource-2> |
|
||||
| oc:name | <resource-2> |
|
||||
| oc:permissions | S |
|
||||
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> |
|
||||
| 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 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 resource "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
|
||||
|
||||
@@ -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 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 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 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 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 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 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 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 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 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
|
||||
@@ -296,7 +296,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 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
|
||||
|
||||
@@ -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 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 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 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 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 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 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 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 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 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 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 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 resource "<<FILEID>>" with these key and value pairs:
|
||||
| key | value |
|
||||
| oc:name | textfile.txt |
|
||||
| oc:permissions | DNVW |
|
||||
|
||||
Reference in New Issue
Block a user