Skip to content

Commit

Permalink
search files using content
Browse files Browse the repository at this point in the history
  • Loading branch information
nabim777 committed Jul 13, 2023
1 parent f2498e1 commit e09e1a8
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 3 deletions.
20 changes: 17 additions & 3 deletions tests/acceptance/config/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,30 @@ default:
- '%paths.base%/../features/apiAntivirus'
context: *common_ldap_suite_context
contexts:
- NotificationContext:
- SettingsContext:
- GraphContext:
- SpacesContext:
- FeatureContext: *common_feature_context_params
- OCSContext:
- GraphContext:
- FilesVersionsContext:
- SettingsContext:
- OcisConfigContext:
- PublicWebDavContext:

apiFullTextSearch:
paths:
- '%paths.base%/../features/apiFullTextSearch'
context: *common_ldap_suite_context
contexts:
- SettingsContext:
- GraphContext:
- SpacesContext:
- PublicWebDavContext:
- FeatureContext: *common_feature_context_params
- SearchContext:
- CapabilitiesContext:
- FilesVersionsContext:
- OCSContext:

extensions:
rdx\behatvars\BehatVariablesExtension: ~

Expand Down
24 changes: 24 additions & 0 deletions tests/acceptance/features/apiFullTextSearch/search.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@api
Feature: full text search
As a user
I want to do full text search
So that I can find the files with the content I am looking for

Background:
Given user "Alice" has been created with default attributes and without skeleton files

Scenario Outline: search files by content
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file with content "hello world" to "file1.txt"
And user "Alice" has uploaded file with content "Namaste nepal" to "file2.txt"
And user "Alice" has uploaded file with content "hello nepal" to "file3.txt"
When user "Alice" searches for "Content:hello" using the WebDAV API
Then the HTTP status code should be "207"
And the search result of user "Alice" should contain only these files:
| file1.txt |
| file3.txt |
Examples:
| dav-path-version |
| old |
| new |
| spaces |

0 comments on commit e09e1a8

Please sign in to comment.