diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml index 1190559c5..23d05fd21 100644 --- a/tests/acceptance/config/behat.yml +++ b/tests/acceptance/config/behat.yml @@ -223,6 +223,7 @@ default: - TagContext: - SpacesTUSContext: - TUSContext: + - OcisConfigContext: apiReshare: paths: diff --git a/tests/acceptance/features/apiSearch/contentSearch.feature b/tests/acceptance/features/apiSearch/contentSearch.feature index c46acab86..3119bcc09 100644 --- a/tests/acceptance/features/apiSearch/contentSearch.feature +++ b/tests/acceptance/features/apiSearch/contentSearch.feature @@ -27,6 +27,63 @@ Feature: content search | spaces | + Scenario Outline: search files by different content types + Given using 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 "einstein@example.org 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 + 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 + 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 And user "Brian" has been created with default attributes and without skeleton files