Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
92682b8a
Commit
92682b8a
authored
Jan 17, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shows current user on top of filtered dropdown list
parent
e7fdb1aa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
app/controllers/autocomplete_controller.rb
app/controllers/autocomplete_controller.rb
+1
-1
spec/features/issues/filtered_search/dropdown_assignee_spec.rb
...features/issues/filtered_search/dropdown_assignee_spec.rb
+6
-0
spec/features/issues/filtered_search/dropdown_author_spec.rb
spec/features/issues/filtered_search/dropdown_author_spec.rb
+6
-0
No files found.
app/controllers/autocomplete_controller.rb
View file @
92682b8a
...
...
@@ -18,7 +18,7 @@ class AutocompleteController < ApplicationController
if
params
[
:search
].
blank?
# Include current user if available to filter by "Me"
if
params
[
:current_user
].
present?
&&
current_user
@users
=
[
*
@users
,
current_user
]
@users
=
[
current_user
,
*
@users
]
end
if
params
[
:author_id
].
present?
...
...
spec/features/issues/filtered_search/dropdown_assignee_spec.rb
View file @
92682b8a
...
...
@@ -66,6 +66,12 @@ describe 'Dropdown assignee', js: true, feature: true do
expect
(
dropdown_assignee_size
).
to
eq
(
3
)
end
it
'shows current user at top of dropdown'
do
send_keys_to_filtered_search
(
'assignee:'
)
expect
(
first
(
'#js-dropdown-assignee .filter-dropdown li'
)).
to
have_content
(
user
.
name
)
end
end
describe
'filtering'
do
...
...
spec/features/issues/filtered_search/dropdown_author_spec.rb
View file @
92682b8a
...
...
@@ -66,6 +66,12 @@ describe 'Dropdown author', js: true, feature: true do
expect
(
dropdown_author_size
).
to
eq
(
3
)
end
it
'shows current user at top of dropdown'
do
send_keys_to_filtered_search
(
'author:'
)
expect
(
first
(
'#js-dropdown-author li'
)).
to
have_content
(
user
.
name
)
end
end
describe
'filtering'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment