diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2017-08-04 11:02:53 +0200 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2017-08-07 12:51:35 +0200 |
commit | 0e6a8a7830379fd3c40f3ca423589d80fd214213 (patch) | |
tree | ea1f5fa020de4606da8a654084ccdabc5b4b49db | |
parent | 938fe8aa56cfaccb9a518fce856854c4922d2ced (diff) | |
download | gitlab-ce-0e6a8a7830379fd3c40f3ca423589d80fd214213.tar.gz |
Fix for squashed avatars, testing if avatar actually loaded
-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:') |