diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:42:06 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:42:06 +0000 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /spec/features/issues/filtered_search | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) | |
download | gitlab-ce-6e4e1050d9dba2b7b2523fdd1768823ab85feef4.tar.gz |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/features/issues/filtered_search')
-rw-r--r-- | spec/features/issues/filtered_search/recent_searches_spec.rb | 21 | ||||
-rw-r--r-- | spec/features/issues/filtered_search/visual_tokens_spec.rb | 4 |
2 files changed, 23 insertions, 2 deletions
diff --git a/spec/features/issues/filtered_search/recent_searches_spec.rb b/spec/features/issues/filtered_search/recent_searches_spec.rb index 85b7a093536..61c1e35f3c8 100644 --- a/spec/features/issues/filtered_search/recent_searches_spec.rb +++ b/spec/features/issues/filtered_search/recent_searches_spec.rb @@ -4,6 +4,7 @@ require 'spec_helper' RSpec.describe 'Recent searches', :js do include FilteredSearchHelpers + include MobileHelpers let(:project_1) { create(:project, :public) } let(:project_2) { create(:project, :public) } @@ -104,4 +105,24 @@ RSpec.describe 'Recent searches', :js do expect(find('.flash-alert')).to have_text('An error occurred while parsing recent searches') end + + context 'on tablet/mobile screen' do + it 'shows only the history icon in the dropdown' do + resize_screen_sm + visit project_issues_path(project_1) + + expect(find('.filtered-search-history-dropdown-wrapper')).to have_selector('svg', visible: true) + expect(find('.filtered-search-history-dropdown-wrapper')).to have_selector('span', text: 'Recent searches', visible: false) + end + end + + context 'on PC screen' do + it 'shows only the Recent searches text in the dropdown' do + restore_window_size + visit project_issues_path(project_1) + + expect(find('.filtered-search-history-dropdown-wrapper')).to have_selector('svg', visible: false) + expect(find('.filtered-search-history-dropdown-wrapper')).to have_selector('span', text: 'Recent searches', visible: true) + end + end end diff --git a/spec/features/issues/filtered_search/visual_tokens_spec.rb b/spec/features/issues/filtered_search/visual_tokens_spec.rb index 59588978a8e..c585d7f6194 100644 --- a/spec/features/issues/filtered_search/visual_tokens_spec.rb +++ b/spec/features/issues/filtered_search/visual_tokens_spec.rb @@ -53,7 +53,7 @@ RSpec.describe 'Visual tokens', :js do end it 'ends editing mode when document is clicked' do - find('#content-body').click + find('.js-navbar').click expect_filtered_search_input_empty expect(page).to have_css('#js-dropdown-author', visible: false) @@ -142,7 +142,7 @@ RSpec.describe 'Visual tokens', :js do it 'does not tokenize incomplete token' do filtered_search.send_keys('author:=') - find('body').click + find('.js-navbar').click token = page.all('.tokens-container .js-visual-token')[1] expect_filtered_search_input_empty |