Skip to content

Commit

Permalink
Added more coverage for full text search
Browse files Browse the repository at this point in the history
  • Loading branch information
grgprarup committed Jun 22, 2023
1 parent 383d9f3 commit 6e582aa
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
30 changes: 20 additions & 10 deletions tests/e2e/cucumber/features/smoke/fullTextSearch.ocis.feature
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ Feature: Search
And "Alice" uploads the following local file into personal space using API
| localFile | to |
| filesForUpload/textfile.txt | fileToShare.txt |
And "Alice" opens the "files" app
And "Alice" adds the following tags for the following resources using the sidebar panel
| resource | tags |
| fileToShare.txt | alice tag |
And "Alice" shares the following resource using API
| resource | recipient | type | role |
| fileToShare.txt | Brian | user | Can edit |
Expand All @@ -39,9 +43,8 @@ Feature: Search
| name |
| spaceFolder |
And "Brian" creates the following file in space "FullTextSearch" using API
| name | content |
| spaceFolder/spaceTextfile.txt | This is test file. |

| name | content |
| spaceFolder/spaceTextfile.txt | This is test file. Cheers |
And "Brian" opens the "files" app
And "Brian" adds the following tags for the following resources using the sidebar panel
| resource | tags |
Expand All @@ -51,7 +54,13 @@ Feature: Search
When "Brian" searches "" using the global search bar
Then "Brian" should see the message "Search for files" on the webUI

When "Brian" selects tag "tag 1" from the search result filter chip
When "Brian" selects tag "alice tag" from the search result filter chip
Then following resources should be displayed in the files list for user "Brian"
| resource |
| fileToShare.txt |

When "Brian" clears tag filter
And "Brian" selects tag "tag 1" from the search result filter chip
Then following resources should be displayed in the files list for user "Brian"
| resource |
| fileWithTag.txt |
Expand All @@ -74,10 +83,11 @@ Feature: Search
When "Brian" enables the option to search in file content
And "Brian" searches "Cheers" using the global search bar
Then following resources should be displayed in the files list for user "Brian"
| resource |
| textfile.txt |
| testFolder/innerTextfile.txt |
| fileToShare.txt |
| fileWithTag.txt |
| withTag.txt |
| resource |
| textfile.txt |
| testFolder/innerTextfile.txt |
| fileToShare.txt |
| fileWithTag.txt |
| withTag.txt |
| spaceFolder/spaceTextfile.txt |
And "Brian" logs out
3 changes: 2 additions & 1 deletion tests/e2e/support/objects/app-files/search/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import util from 'util'

const globalSearchInputSelector = '.oc-search-input'
const searchResultMessageSelector = '//p[@class="oc-text-muted"]'
const selectTagDropdownSelector = '.files-search-filter-tags'
const selectTagDropdownSelector =
'//div[contains(@class,"files-search-filter-tags")]//button[contains(@class,"oc-filter-chip-button")]'
const tagFilterChipSelector = '//button[contains(@data-test-value,"%s")]'
const clearTagFilterSelector =
'//div[contains(@class,"files-search-filter-tags")]//button[contains(@class,"oc-filter-chip-clear")]'
Expand Down

0 comments on commit 6e582aa

Please sign in to comment.