Commit fe275a80 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '197894' into 'master'

Fix(MVC) Assignee(s) avatar dissapear when opening issue sidebar in board

See merge request gitlab-org/gitlab!23830
parents 0ca96da5 e21ce4bc
......@@ -233,7 +233,7 @@ export default {
:key="assignee.id"
:link-href="assigneeUrl(assignee)"
:img-alt="avatarUrlTitle(assignee)"
:img-src="assignee.avatar"
:img-src="assignee.avatar || assignee.avatar_url"
:img-size="24"
class="js-no-trigger"
tooltip-placement="bottom"
......
---
title: MVC for assignees avatar dissapearing when opening issue sidebar in board
merge_request:
author: Oregand
type: fixed
......@@ -97,6 +97,9 @@ describe('Issue card component', () => {
issue: {
...wrapper.props('issue'),
assignees: [user],
updateData(newData) {
Object.assign(this, newData);
},
},
});
......@@ -118,6 +121,28 @@ describe('Issue card component', () => {
it('renders avatar', () => {
expect(wrapper.find('.board-card-assignee img').exists()).toBe(true);
});
it('renders the avatar using avatar_url property', done => {
wrapper.props('issue').updateData({
...wrapper.props('issue'),
assignees: [
{
id: '1',
name: 'test',
state: 'active',
username: 'test_name',
avatar_url: 'test_image_from_avatar_url',
},
],
});
wrapper.vm.$nextTick(() => {
expect(wrapper.find('.board-card-assignee img').attributes('src')).toBe(
'test_image_from_avatar_url?width=24',
);
done();
});
});
});
describe('assignee default avatar', () => {
......
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