Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test-only] increase test coverage for content search #7574

Merged
merged 2 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/acceptance/config/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ default:
- TagContext:
- SpacesTUSContext:
- TUSContext:
- OcisConfigContext:

apiReshare:
paths:
Expand Down
57 changes: 57 additions & 0 deletions tests/acceptance/features/apiSearch/contentSearch.feature
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,63 @@ Feature: content search
| spaces |


Scenario Outline: search files by different content types
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file with content "Using k6, you can test the reliability and performance of your systems" to "wordWithNumber.md"
And user "Alice" has uploaded file with content "see our web site https://owncloud.com/infinite-scale-4-0" to "findByWebSite.txt"
And user "Alice" has uploaded file with content "[email protected] want to say hello" to "findByEmail.docs"
When user "Alice" searches for "Content:k6" using the WebDAV API
Then the HTTP status code should be "207"
And the search result of user "Alice" should contain only these files:
| wordWithNumber.md |
When user "Alice" searches for "Content:https://owncloud.com/" using the WebDAV API
Then the HTTP status code should be "207"
And the search result of user "Alice" should contain only these files:
| findByWebSite.txt |
When user "Alice" searches for "Content:einstein@" using the WebDAV API
Then the HTTP status code should be "207"
And the search result of user "Alice" should contain only these files:
| findByEmail.docs |
Examples:
| dav-path-version |
| old |
| new |
| spaces |


Scenario Outline: search files by stop words when clean_stop_words is enabled (default)
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file with content "He has expirience, we must to have, I have to find ...." to "fileWithStopWords.txt"
When user "Alice" searches for 'Content:"he has"' using the WebDAV API
Then the HTTP status code should be "207"
And the search result of user "Brian" should not contain these entries:
| fileWithStopWords.txt |
Examples:
| dav-path-version |
| old |
| new |
| spaces |

@env-config
Scenario Outline: search files by stop words when clean_stop_words is disabled
Given using <dav-path-version> DAV path
And the config "SEARCH_EXTRACTOR_TIKA_CLEAN_STOP_WORDS" has been set to "false"
And user "Alice" has uploaded file with content "He has expirience, we must to have, I have to find ...." to "fileWithStopWords.txt"
When user "Alice" searches for 'Content:"he has"' using the WebDAV API
Then the HTTP status code should be "207"
And the search result of user "Alice" should contain only these files:
| fileWithStopWords.txt |
When user "Alice" searches for 'Content:"I have"' using the WebDAV API
Then the HTTP status code should be "207"
And the search result of user "Alice" should contain only these files:
| fileWithStopWords.txt |
Examples:
| dav-path-version |
| old |
| new |
| spaces |


Scenario Outline: sharee searches files by content
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
Expand Down