diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 15:40:28 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 15:40:28 +0000 |
commit | b595cb0c1dec83de5bdee18284abe86614bed33b (patch) | |
tree | 8c3d4540f193c5ff98019352f554e921b3a41a72 /spec/frontend/notes/components/noteable_note_spec.js | |
parent | 2f9104a328fc8a4bddeaa4627b595166d24671d0 (diff) | |
download | gitlab-ce-b595cb0c1dec83de5bdee18284abe86614bed33b.tar.gz |
Add latest changes from gitlab-org/gitlab@15-2-stable-eev15.2.0-rc42
Diffstat (limited to 'spec/frontend/notes/components/noteable_note_spec.js')
-rw-r--r-- | spec/frontend/notes/components/noteable_note_spec.js | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/spec/frontend/notes/components/noteable_note_spec.js b/spec/frontend/notes/components/noteable_note_spec.js index 385edc59eb6..3350609bb90 100644 --- a/spec/frontend/notes/components/noteable_note_spec.js +++ b/spec/frontend/notes/components/noteable_note_spec.js @@ -1,20 +1,15 @@ import { mount } from '@vue/test-utils'; import Vue, { nextTick } from 'vue'; import Vuex from 'vuex'; - +import { GlAvatar } from '@gitlab/ui'; import waitForPromises from 'helpers/wait_for_promises'; - import DiffsModule from '~/diffs/store/modules'; - import NoteActions from '~/notes/components/note_actions.vue'; import NoteBody from '~/notes/components/note_body.vue'; import NoteHeader from '~/notes/components/note_header.vue'; import issueNote from '~/notes/components/noteable_note.vue'; import NotesModule from '~/notes/stores/modules'; import { NOTEABLE_TYPE_MAPPING } from '~/notes/constants'; - -import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue'; - import { noteableDataMock, notesDataMock, note } from '../mock_data'; Vue.use(Vuex); @@ -205,19 +200,21 @@ describe('issue_note', () => { await nextTick(); - expect(wrapper.findComponent(UserAvatarLink).props('imgSize')).toBe(24); + const avatar = wrapper.findComponent(GlAvatar); + const avatarProps = avatar.props(); + expect(avatarProps.size).toBe(24); }); }); - it('should render user information', () => { + it('should render user avatar', () => { const { author } = note; - const avatar = wrapper.findComponent(UserAvatarLink); + const avatar = wrapper.findComponent(GlAvatar); const avatarProps = avatar.props(); - expect(avatarProps.linkHref).toBe(author.path); - expect(avatarProps.imgSrc).toBe(author.avatar_url); - expect(avatarProps.imgAlt).toBe(author.name); - expect(avatarProps.imgSize).toBe(40); + expect(avatarProps.src).toBe(author.avatar_url); + expect(avatarProps.entityName).toBe(author.username); + expect(avatarProps.alt).toBe(author.name); + expect(avatarProps.size).toEqual({ default: 24, md: 32 }); }); it('should render note header content', () => { |