diff --git a/spec/javascripts/vue_shared/components/user_avatar_link_spec.js b/spec/javascripts/vue_shared/components/user_avatar_link_spec.js index ce75df6fc7b..c10528360a3 100644 --- a/spec/javascripts/vue_shared/components/user_avatar_link_spec.js +++ b/spec/javascripts/vue_shared/components/user_avatar_link_spec.js @@ -56,8 +56,12 @@ describe('User Avatar Link Component', function () { Vue.nextTick(done); }); - it('should not render as a child element', function () { - expect(this.userAvatarLink.$el.querySelector('span')).toBeNull(); + it('should only render image tag in link', function () { + const childElements = this.userAvatarLink.$el.childNodes; + expect(childElements[0].tagName).toBe('IMG'); + + // Vue will render the hidden component as + expect(childElements[1].tagName).toBeUndefined(); }); it('should render avatar image tooltip', function () {