diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2017-11-12 10:32:26 +0300 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2017-11-12 10:32:26 +0300 |
commit | 111faddc50fa2cdf12988b68c3f4e3660f3139a8 (patch) | |
tree | 6e4a8205b233e19be08f0c85477e9b654461d209 /spec/features/merge_requests | |
parent | d180affa210bd6e5474746bcfed006cee9d3730e (diff) | |
parent | fdf635c03c2621fe36eba5691c1ab8b1a51f1081 (diff) |
Merge branch '39564-clear-filter-on-gitlab-dropdown-open' into 'master'
Clear filter on gl_dropdown open
Closes #39564
See merge request gitlab-org/gitlab-ce!15214
Diffstat (limited to 'spec/features/merge_requests')
-rw-r--r-- | spec/features/merge_requests/create_new_mr_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/features/merge_requests/create_new_mr_spec.rb b/spec/features/merge_requests/create_new_mr_spec.rb index 5402d61da54..db5ce2d11a8 100644 --- a/spec/features/merge_requests/create_new_mr_spec.rb +++ b/spec/features/merge_requests/create_new_mr_spec.rb @@ -67,6 +67,28 @@ feature 'Create New Merge Request', :js do expect(page).to have_content 'git checkout -b orphaned-branch origin/orphaned-branch' 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 target project cannot be viewed by the current user' do it 'does not leak the private project name & namespace' do private_project = create(:project, :private, :repository) |