summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKushal Pandya <kushal@gitlab.com>2018-02-27 20:37:41 +0530
committerKushal Pandya <kushal@gitlab.com>2018-02-27 20:37:41 +0530
commit13a7fde703ea820ce5649bb549aac4f8a3d8b560 (patch)
tree37955f01c8e6e1505aa618f6c585d17293b6661c
parent6952a9b3846542c3be833e77e67e1ae51cfd9e73 (diff)
downloadgitlab-ce-24774-clear-the-Labels-dropdown-search-filter.tar.gz
Add test for label search behaviour24774-clear-the-Labels-dropdown-search-filter
-rw-r--r--spec/features/issues/form_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/features/issues/form_spec.rb b/spec/features/issues/form_spec.rb
index c2c4b479a8a..ef6b8edd0ad 100644
--- a/spec/features/issues/form_spec.rb
+++ b/spec/features/issues/form_spec.rb
@@ -189,6 +189,18 @@ describe 'New/edit issue', :js do
expect(find('.js-label-select')).to have_content('Labels')
end
+ it 'clears label search input field when a label is selected' do
+ click_button 'Labels'
+
+ page.within '.dropdown-menu-labels' do
+ search_field = find('input[type="search"]')
+
+ search_field.set(label2.title)
+ click_link label2.title
+ expect(search_field.value).to eq ''
+ end
+ end
+
it 'correctly updates the selected user when changing assignee' do
click_button 'Unassigned'