diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-11-06 13:12:06 +0000 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-11-06 13:12:06 +0000 |
commit | 8dc55ff35e4bfc46c9a5a9dd751648eb7ed73daf (patch) | |
tree | 750ba0d654f42fbf43dd4354ff496f5c6f98ca02 /spec/features | |
parent | 906b3b4b938b38813c44bad2d64eca05a03ff7f0 (diff) | |
download | gitlab-ce-8dc55ff35e4bfc46c9a5a9dd751648eb7ed73daf.tar.gz |
add feature spec to assert no linked filter inputs
Diffstat (limited to 'spec/features')
-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) |