summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-11-17 17:12:07 +0000
committerFatih Acet <acetfatih@gmail.com>2016-11-17 17:12:07 +0000
commita1b840eb921cd1e16d0f5b4d3e0008167b3d79f5 (patch)
treee1a88a87a7f44714a62643d62b8f895568db8fa2 /spec/features
parent8762db3b8f5f45bb46de2d0fb0d8e4fd6bc04058 (diff)
parent80073da95771fc51a4ac05814b0a7ceae1cbdac9 (diff)
downloadgitlab-ce-a1b840eb921cd1e16d0f5b4d3e0008167b3d79f5.tar.gz
Merge branch 'assignee-dropdown-autocomplete' into 'master'
Include author in assignee dropdown search ## What does this MR do? Previously when you searched for the author in the assignee dropdown (if they aren't in the project) it did not actually include the author. This changes that so that when you search for the author it will correctly include the user. ## Screenshots (if relevant) ![Screen_Shot_2016-11-17_at_11.14.53](/uploads/5a13475d8ded459fd3b1ba6570897665/Screen_Shot_2016-11-17_at_11.14.53.png) ## What are the relevant issue numbers? Closes #22905 See merge request !7526
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/issues/issue_sidebar_spec.rb35
1 files changed, 34 insertions, 1 deletions
diff --git a/spec/features/issues/issue_sidebar_spec.rb b/spec/features/issues/issue_sidebar_spec.rb
index 4b1aec8bf71..bc068b5e7e0 100644
--- a/spec/features/issues/issue_sidebar_spec.rb
+++ b/spec/features/issues/issue_sidebar_spec.rb
@@ -1,7 +1,9 @@
require 'rails_helper'
feature 'Issue Sidebar', feature: true do
- let(:project) { create(:project) }
+ include WaitForAjax
+
+ let(:project) { create(:project, :public) }
let(:issue) { create(:issue, project: project) }
let!(:user) { create(:user)}
@@ -10,6 +12,37 @@ feature 'Issue Sidebar', feature: true do
login_as(user)
end
+ context 'assignee', js: true do
+ let(:user2) { create(:user) }
+ let(:issue2) { create(:issue, project: project, author: user2) }
+
+ before do
+ project.team << [user, :developer]
+ visit_issue(project, issue2)
+
+ find('.block.assignee .edit-link').click
+
+ wait_for_ajax
+ end
+
+ it 'shows author in assignee dropdown' do
+ page.within '.dropdown-menu-user' do
+ expect(page).to have_content(user2.name)
+ end
+ end
+
+ it 'shows author when filtering assignee dropdown' do
+ page.within '.dropdown-menu-user' do
+ find('.dropdown-input-field').native.send_keys user2.name
+ sleep 1 # Required to wait for end of input delay
+
+ wait_for_ajax
+
+ expect(page).to have_content(user2.name)
+ end
+ end
+ end
+
context 'as a allowed user' do
before do
project.team << [user, :developer]