Compare commits

...
Author SHA1 Message Date
Kavita Gautam 5af7f073b6 test: added metadata KQL search operator 2026-06-09 17:46:33 +05:45
3 changed files with 44 additions and 14 deletions

No files matched your search

@@ -272,6 +272,7 @@ class SearchContext implements Context {
foreach ($elementRows as $expectedFile) { foreach ($elementRows as $expectedFile) {
$filename = $expectedFile[0]; $filename = $expectedFile[0];
$content = $foundEntries[$filename]; $content = $foundEntries[$filename];
var_dump('contenttttttttttttt', $content);
// Extract the content between the <mark> tags // Extract the content between the <mark> tags
preg_match('/<mark>(.*?)<\/mark>/s', $content, $matches); preg_match('/<mark>(.*?)<\/mark>/s', $content, $matches);
$actualContent = $matches[1] ?? ''; $actualContent = $matches[1] ?? '';
+2
View File
@@ -4433,6 +4433,8 @@ trait WebDav {
if ($multistatusResults === null) { if ($multistatusResults === null) {
$multistatusResults = []; $multistatusResults = [];
} }
// var_dump($responseXmlArray);
var_dump("numfilesssssssssssssssssssssssssss", $numFiles);
Assert::assertEquals( Assert::assertEquals(
$numFiles, $numFiles,
\count($multistatusResults), \count($multistatusResults),
@@ -123,19 +123,46 @@ Feature: metadata type search
| permissionsRole | Space Viewer | | permissionsRole | Space Viewer |
When user "Brian" searches for '<query>' using the WebDAV API When user "Brian" searches for '<query>' using the WebDAV API
Then the HTTP status code should be "207" Then the HTTP status code should be "207"
And the search result should contain "1" entries And the search result should contain "<expectedCount>" entries
And the search result of user "Brian" should contain these entries: And the search result of user "Brian" should contain these entries:
| testavatar.jpg | | <expectedFile1> |
| <expectedFile2> |
# Examples:
# | query |
# | photo.cameraMake=NIKON |
# | photo.cameraModel="COOLPIX P6000" |
# | photo.exposureDenominator=178 |
# | photo.exposureNumerator=1 |
# | photo.fNumber=4.5 |
# | photo.focalLength=6 |
# | photo.orientation=1 |
# | photo.takenDateTime=2008-10-22 |
# | location.latitude=43.467157 |
# | location.longitude=11.885395 |
# | location.altitude=100 |
Examples: Examples:
| query | | query | expectedCount | expectedFile1 | expectedFile2 |
| photo.cameraMake=NIKON | | photo.cameraMake=NIKON | 1 | testavatar.jpg | |
| photo.cameraModel="COOLPIX P6000" | | photo.cameraModel="COOLPIX P6000" | 1 | testavatar.jpg | |
| photo.exposureDenominator=178 | | photo.exposureDenominator=178 | 1 | testavatar.jpg | |
| photo.exposureNumerator=1 | | photo.exposureNumerator=1 | 1 | testavatar.jpg | |
| photo.fNumber=4.5 | | photo.fNumber=4.5 | 1 | testavatar.jpg | |
| photo.focalLength=6 | | photo.focalLength=6 | 1 | testavatar.jpg | |
| photo.orientation=1 | | photo.orientation=1 | 1 | testavatar.jpg | |
| photo.takenDateTime=2008-10-22 | | photo.takenDateTime=2008-10-22 | 1 | testavatar.jpg | |
| location.latitude=43.467157 | | location.latitude=43.467157 | 1 | testavatar.jpg | |
| location.longitude=11.885395 | | location.longitude=11.885395 | 1 | testavatar.jpg | |
| location.altitude=100 | | location.altitude=100 | 1 | testavatar.jpg | |
| NOT photo.cameraMake=CANON | 2 | testavatar.jpg | testavatar.png |
| NOT photo.exposureDenominator=180 | 2 | testavatar.jpg | testavatar.png |
| NOT photo.orientation=2 | 2 | testavatar.jpg | testavatar.png |
| NOT photo.takenDateTime=2007-01-01 | 2 | testavatar.jpg | testavatar.png |
| photo.exposureDenominator<180 | 1 | testavatar.jpg | |
| photo.exposureDenominator<=178 | 1 | testavatar.jpg | |
| photo.fNumber>4 | 1 | testavatar.jpg | |
| location.altitude<150 | 1 | testavatar.jpg | |
| location.altitude>=100 | 1 | testavatar.jpg | |
| photo.focalLength<10 | 1 | testavatar.jpg | |
| photo.focalLength>4 | 1 | testavatar.jpg | |
| photo.focalLength>=6 | 1 | testavatar.jpg | |