enable search tests
This commit is contained in:
@@ -182,7 +182,11 @@ class SearchContext implements Context {
|
||||
$property['value'],
|
||||
$user
|
||||
);
|
||||
$fileResultProperty = $fileResult->xpath("d:propstat//" . $property['name']);
|
||||
if (is_object($fileResult)) {
|
||||
$fileResultProperty = $fileResult->xpath("d:propstat//" . $property['name']);
|
||||
} else {
|
||||
throw new Exception("Expected fileResult to be an object, but found " . gettype($fileResult));
|
||||
}
|
||||
if ($fileResultProperty) {
|
||||
Assert::assertMatchesRegularExpression(
|
||||
"/" . $property['value'] . "/",
|
||||
@@ -270,7 +274,7 @@ class SearchContext implements Context {
|
||||
): void {
|
||||
// NOTE: since indexing of newly uploaded files or directories with OpenCloud is decoupled and occurs asynchronously,
|
||||
// a short wait is necessary before searching
|
||||
sleep(5);
|
||||
sleep(2);
|
||||
$response = $this-> searchFiles($user, $pattern, null, $scopeType, $scope, $spaceName);
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
@@ -4594,11 +4594,7 @@ trait WebDav {
|
||||
// do not try to parse the resource path
|
||||
// if the item to search is space itself
|
||||
if (!GraphHelper::isSpaceId($entryNameToSearch ?? '')) {
|
||||
$resourcePath = \substr($resourcePath, \strpos($resourcePath, '/') + 1);
|
||||
}
|
||||
if (\count($shareRootXml)) {
|
||||
$shareroot = \trim((string)$shareRootXml[0], "/");
|
||||
$resourcePath = $shareroot . "/" . $resourcePath;
|
||||
$resourcePath = basename($resourcePath);
|
||||
}
|
||||
$resourcePath = \rawurldecode($resourcePath);
|
||||
if ($entryNameToSearch === $resourcePath) {
|
||||
|
||||
Reference in New Issue
Block a user