enable search tests

This commit is contained in:
Viktor Scharf
2025-02-14 09:26:32 +01:00
parent d3323dc505
commit c49915066c
12 changed files with 177 additions and 274 deletions
+6 -2
View File
@@ -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);
}