test(search): cover trailing NOT operator in invalid KQL patterns (#3982)

* test(search): cover trailing NOT operator in invalid KQL patterns

* skip downloadFile:321 for reva
This commit is contained in:
Viktor Scharf authored and GitHub committed 2026-11-16 08:43:59 +01:00
1 parent 9c33410bbe
commit bb2db1de60
2 files changed
+8 -4

No files matched your search

@@ -343,12 +343,16 @@ Feature: Search
| name:"*der2" | subFOLDER2 | pattern 'name:""' (with quotes) |
@issue-7812 @issue-8442 @issue-10329
Scenario: try to search with invalid patterns
Scenario Outline: try to search with invalid patterns
Given using spaces DAV path
And user "Alice" has uploaded file with content "test file" to "testFile.txt"
When user "Alice" searches for 'AND mediatype:document' using the WebDAV API
When user "Alice" searches for "<pattern>" using the WebDAV API
Then the HTTP status code should be "400"
And the value of the item "/d:error/s:message" in the response should be "error: bad request: the operator 'AND' is missing an operand"
And the value of the item "/d:error/s:message" in the response should be "error: bad request: the operator '<operator>' is missing an operand"
Examples:
| pattern | operator |
| AND mediatype:document | AND |
| alice NOT | NOT |
@issue-10329
Scenario Outline: search a file globally (in all spaces)
@@ -317,7 +317,7 @@ Feature: download file
| spaces | "file #2.txt" |
| spaces | "file ?2.pdf" |
@issue-2852
@issue-2852 @skipOnReva
Scenario Outline: download a file whose name contains a literal "%" via its oc:downloadURL
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file with content "test file" to "firstword%20secondword.txt"