diff options
author | Phil Hughes <me@iamphill.com> | 2016-06-15 11:34:11 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-06-15 11:34:11 +0100 |
commit | aa35abf9bf7ad528369bd8b54796f38cf68dfd96 (patch) | |
tree | c951b3cf2007a453e7f42109c820134998b1edda /spec/features/issues/move_spec.rb | |
parent | e412c1f25e9abfebaa7b5669e1acf7f26a66d722 (diff) | |
download | gitlab-ce-aa35abf9bf7ad528369bd8b54796f38cf68dfd96.tar.gz |
Added test to dropdown search
Diffstat (limited to 'spec/features/issues/move_spec.rb')
-rw-r--r-- | spec/features/issues/move_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/features/issues/move_spec.rb b/spec/features/issues/move_spec.rb index c7019c5aea1..7773c486b4e 100644 --- a/spec/features/issues/move_spec.rb +++ b/spec/features/issues/move_spec.rb @@ -26,6 +26,7 @@ feature 'issue move to another project' do context 'user has permission to move issue' do let!(:mr) { create(:merge_request, source_project: old_project) } let(:new_project) { create(:project) } + let(:new_project_search) { create(:project) } let(:text) { 'Text with !1' } let(:cross_reference) { old_project.to_reference } @@ -47,6 +48,21 @@ feature 'issue move to another project' do expect(page).to have_content(issue.title) end + scenario 'searching project dropdown', js: true do + new_project_search.team << [user, :reporter] + + page.within '.js-move-dropdown' do + first('.select2-choice').click + end + + fill_in('s2id_autogen2_search', with: new_project_search.name) + + page.within '.select2-drop' do + expect(page).to have_content(new_project_search.name) + expect(page).not_to have_content(new_project.name) + end + end + context 'user does not have permission to move the issue to a project', js: true do let!(:private_project) { create(:project, :private) } let(:another_project) { create(:project) } |