Commit cb1b4af0 authored by Tim Zallmann's avatar Tim Zallmann Committed by Clement Ho

Resolve "User dropdown in filtered search does not load avatar on `master`"

parent 475f41ac
...@@ -100,6 +100,8 @@ ...@@ -100,6 +100,8 @@
margin: 0; margin: 0;
align-self: center; align-self: center;
} }
&.s40 { min-width: 40px; min-height: 40px; }
} }
.avatar-counter { .avatar-counter {
......
...@@ -19,7 +19,8 @@ module AvatarsHelper ...@@ -19,7 +19,8 @@ module AvatarsHelper
class: %W[avatar has-tooltip s#{avatar_size}].push(*options[:css_class]), class: %W[avatar has-tooltip s#{avatar_size}].push(*options[:css_class]),
alt: "#{user_name}'s avatar", alt: "#{user_name}'s avatar",
title: user_name, title: user_name,
data: data_attributes data: data_attributes,
lazy: true
) )
end end
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
%li.filter-dropdown-item{ class: ('js-current-user' if user == current_user) } %li.filter-dropdown-item{ class: ('js-current-user' if user == current_user) }
%button.btn.btn-link.dropdown-user{ type: :button } %button.btn.btn-link.dropdown-user{ type: :button }
= user_avatar_without_link(user: user, lazy: avatar[:lazy], url: avatar[:url], size: 30) .avatar-container.s40
= user_avatar_without_link(user: user, lazy: avatar[:lazy], url: avatar[:url], size: 40).gsub('/images/{{avatar_url}}','{{avatar_url}}').html_safe
.dropdown-user-details .dropdown-user-details
%span %span
= user.name = user.name
......
...@@ -41,7 +41,7 @@ describe 'New/edit merge request', :js do ...@@ -41,7 +41,7 @@ describe 'New/edit merge request', :js do
expect(page).to have_content user2.name expect(page).to have_content user2.name
end end
click_link 'Assign to me' find('a', text: 'Assign to me').trigger('click')
expect(find('input[name="merge_request[assignee_id]"]', visible: false).value).to match(user.id.to_s) expect(find('input[name="merge_request[assignee_id]"]', visible: false).value).to match(user.id.to_s)
page.within '.js-assignee-search' do page.within '.js-assignee-search' do
expect(page).to have_content user.name expect(page).to have_content user.name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment