diff options
-rw-r--r-- | app/assets/stylesheets/framework/avatar.scss | 2 | ||||
-rw-r--r-- | spec/features/issues/filtered_search/dropdown_author_spec.rb | 14 |
2 files changed, 16 insertions, 0 deletions
diff --git a/app/assets/stylesheets/framework/avatar.scss b/app/assets/stylesheets/framework/avatar.scss index cb41df8a88d..3809c1af3b6 100644 --- a/app/assets/stylesheets/framework/avatar.scss +++ b/app/assets/stylesheets/framework/avatar.scss @@ -34,6 +34,8 @@ width: 40px; height: 40px; + min-width: 40px; + min-height: 40px; padding: 0; background: $avatar-background; overflow: hidden; diff --git a/spec/features/issues/filtered_search/dropdown_author_spec.rb b/spec/features/issues/filtered_search/dropdown_author_spec.rb index 4bbf18e1dbe..4b730e3a462 100644 --- a/spec/features/issues/filtered_search/dropdown_author_spec.rb +++ b/spec/features/issues/filtered_search/dropdown_author_spec.rb @@ -68,6 +68,20 @@ describe 'Dropdown author', js: true do expect(dropdown_author_size).to eq(4) end + it 'should load the avatar image' do + send_keys_to_filtered_search('author:') + + wait_for_requests + + broken_image = execute_script( + "return arguments[0].complete && \ + typeof arguments[0].naturalWidth != \"undefined\" && \ + arguments[0].naturalWidth > 0", + find('#js-dropdown-author li:nth-child(2) img')) + + expect(broken_image).to be_empty + end + it 'shows current user at top of dropdown' do send_keys_to_filtered_search('author:') |