diff options
author | Luke Bennett <lbennett@gitlab.com> | 2019-05-24 20:20:05 +0100 |
---|---|---|
committer | Luke Bennett <lbennett@gitlab.com> | 2019-05-31 14:40:00 +0100 |
commit | 9181e4b135053140fe61f785603eb8101f4534f1 (patch) | |
tree | 3093be29ed92c168eb54bd99f440facc5a48a585 /spec/features/global_search_spec.rb | |
parent | 12aff0b73cacf533533d584d68307b1b6a030cee (diff) | |
download | gitlab-ce-9181e4b135053140fe61f785603eb8101f4534f1.tar.gz |
Fix search dropdown not closing on blur if emptyfix-search-dropdown-blur-close
Diffstat (limited to 'spec/features/global_search_spec.rb')
-rw-r--r-- | spec/features/global_search_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/features/global_search_spec.rb b/spec/features/global_search_spec.rb index d7692181453..f2ab5373d3d 100644 --- a/spec/features/global_search_spec.rb +++ b/spec/features/global_search_spec.rb @@ -25,4 +25,18 @@ describe 'Global search' do expect(page).to have_selector('.gl-pagination .next') end end + + it 'closes the dropdown on blur', :js do + visit dashboard_projects_path + + fill_in 'search', with: "a" + dropdown = find('.js-dashboard-search-options') + + expect(dropdown[:class]).to include 'show' + + find('#search').send_keys(:backspace) + find('body').click + + expect(dropdown[:class]).not_to include 'show' + end end |