diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-04 21:09:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-04 21:09:30 +0300 |
commit | 496cdee0e3a2d341ccd7b1ead9654dfe35215809 (patch) | |
tree | 16f0f95626155d4157a423609543dbc170f7d5dd /spec/frontend/vue_shared/components/notes | |
parent | 07516504537bef518a3f80b60ebca761209feab5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/vue_shared/components/notes')
-rw-r--r-- | spec/frontend/vue_shared/components/notes/__snapshots__/placeholder_note_spec.js.snap | 23 | ||||
-rw-r--r-- | spec/frontend/vue_shared/components/notes/placeholder_note_spec.js | 12 |
2 files changed, 19 insertions, 16 deletions
diff --git a/spec/frontend/vue_shared/components/notes/__snapshots__/placeholder_note_spec.js.snap b/spec/frontend/vue_shared/components/notes/__snapshots__/placeholder_note_spec.js.snap index 5e956d66b6a..bf6c8e8c704 100644 --- a/spec/frontend/vue_shared/components/notes/__snapshots__/placeholder_note_spec.js.snap +++ b/spec/frontend/vue_shared/components/notes/__snapshots__/placeholder_note_spec.js.snap @@ -7,16 +7,19 @@ exports[`Issue placeholder note component matches snapshot 1`] = ` <div class="timeline-icon" > - <user-avatar-link-stub - imgalt="" - imgcssclasses="" - imgsize="40" - imgsrc="mock_path" - linkhref="/root" - tooltipplacement="top" - tooltiptext="" - username="" - /> + <gl-avatar-link-stub + class="gl-mr-3" + href="/root" + > + <gl-avatar-stub + alt="Root" + entityid="0" + entityname="root" + shape="circle" + size="[object Object]" + src="mock_path" + /> + </gl-avatar-link-stub> </div> <div diff --git a/spec/frontend/vue_shared/components/notes/placeholder_note_spec.js b/spec/frontend/vue_shared/components/notes/placeholder_note_spec.js index 6881cb79740..f951cfd5cd9 100644 --- a/spec/frontend/vue_shared/components/notes/placeholder_note_spec.js +++ b/spec/frontend/vue_shared/components/notes/placeholder_note_spec.js @@ -1,8 +1,8 @@ import { shallowMount } from '@vue/test-utils'; +import { GlAvatar } from '@gitlab/ui'; import Vue from 'vue'; import Vuex from 'vuex'; import IssuePlaceholderNote from '~/vue_shared/components/notes/placeholder_note.vue'; -import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue'; import { userDataMock } from 'jest/notes/mock_data'; Vue.use(Vuex); @@ -56,14 +56,14 @@ describe('Issue placeholder note component', () => { describe('avatar size', () => { it.each` - size | line | isOverviewTab - ${40} | ${null} | ${false} - ${24} | ${{ line_code: '123' }} | ${false} - ${40} | ${{ line_code: '123' }} | ${true} + size | line | isOverviewTab + ${{ default: 24, md: 32 }} | ${null} | ${false} + ${24} | ${{ line_code: '123' }} | ${false} + ${{ default: 24, md: 32 }} | ${{ line_code: '123' }} | ${true} `('renders avatar $size for $line and $isOverviewTab', ({ size, line, isOverviewTab }) => { createComponent(false, { line, isOverviewTab }); - expect(wrapper.findComponent(UserAvatarLink).props('imgSize')).toBe(size); + expect(wrapper.findComponent(GlAvatar).props('size')).toEqual(size); }); }); }); |