Commit aa98f7c4 authored by Tim Zallmann's avatar Tim Zallmann

Merge branch 'ee-39564-clear-filter-on-gitlab-dropdown-open' into 'master'

EE clear filter on gitlab dropdown open

See merge request gitlab-org/gitlab-ee!3332
parents 235145e7 74efede7
...@@ -331,7 +331,7 @@ GitLabDropdown = (function() { ...@@ -331,7 +331,7 @@ GitLabDropdown = (function() {
if (_this.dropdown.find('.dropdown-toggle-page').length) { if (_this.dropdown.find('.dropdown-toggle-page').length) {
selector = ".dropdown-page-one " + selector; selector = ".dropdown-page-one " + selector;
} }
return $(selector); return $(selector, this.instance.dropdown);
}; };
})(this), })(this),
data: (function(_this) { data: (function(_this) {
......
...@@ -67,6 +67,28 @@ feature 'Create New Merge Request', :js do ...@@ -67,6 +67,28 @@ feature 'Create New Merge Request', :js do
expect(page).to have_content 'git checkout -b orphaned-branch origin/orphaned-branch' expect(page).to have_content 'git checkout -b orphaned-branch origin/orphaned-branch'
end end
it 'allows filtering multiple dropdowns' do
visit project_new_merge_request_path(project)
first('.js-source-branch').click
input = find('.dropdown-source-branch .dropdown-input-field')
input.click
input.send_keys('orphaned-branch')
find('.dropdown-source-branch .dropdown-content li', match: :first)
source_items = all('.dropdown-source-branch .dropdown-content li')
expect(source_items.count).to eq(1)
first('.js-target-branch').click
find('.dropdown-target-branch .dropdown-content li', match: :first)
target_items = all('.dropdown-target-branch .dropdown-content li')
expect(target_items.count).to be > 1
end
context 'when approvals are disabled for the target project' do context 'when approvals are disabled for the target project' do
it 'does not show approval settings' do it 'does not show approval settings' do
visit project_new_merge_request_path(project, merge_request: { target_branch: 'master', source_branch: 'feature_conflict' }) visit project_new_merge_request_path(project, merge_request: { target_branch: 'master', source_branch: 'feature_conflict' })
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment