diff --git a/tests/e2e/cucumber/features/smoke/fullTextSearch.ocis.feature b/tests/e2e/cucumber/features/smoke/fullTextSearch.ocis.feature index 5fa3450b73d..0325388e060 100644 --- a/tests/e2e/cucumber/features/smoke/fullTextSearch.ocis.feature +++ b/tests/e2e/cucumber/features/smoke/fullTextSearch.ocis.feature @@ -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 | @@ -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 | @@ -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 | @@ -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 diff --git a/tests/e2e/support/objects/app-files/search/actions.ts b/tests/e2e/support/objects/app-files/search/actions.ts index 6bc900d10e4..dce5d45f091 100644 --- a/tests/e2e/support/objects/app-files/search/actions.ts +++ b/tests/e2e/support/objects/app-files/search/actions.ts @@ -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")]'