diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-29 09:07:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-29 09:07:58 +0300 |
commit | 95085ac5cdbf6fcb12c6bdb167f663844d05147d (patch) | |
tree | a0107e379526090ec3be43eb81929e159b912a4c /spec/frontend/work_items | |
parent | 111f9a7cc6834edfeb81c4b91bcf43df332096a7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/work_items')
-rw-r--r-- | spec/frontend/work_items/components/notes/work_item_note_spec.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/frontend/work_items/components/notes/work_item_note_spec.js b/spec/frontend/work_items/components/notes/work_item_note_spec.js index 09299f1733c..59158d2ba15 100644 --- a/spec/frontend/work_items/components/notes/work_item_note_spec.js +++ b/spec/frontend/work_items/components/notes/work_item_note_spec.js @@ -1,6 +1,7 @@ import { shallowMount } from '@vue/test-utils'; import Vue, { nextTick } from 'vue'; import VueApollo from 'vue-apollo'; +import { GlAvatarLink } from '@gitlab/ui'; import mockApollo from 'helpers/mock_apollo_helper'; import waitForPromises from 'helpers/wait_for_promises'; import { updateDraft, clearDraft } from '~/lib/utils/autosave'; @@ -270,6 +271,19 @@ describe('Work Item Note', () => { createComponent(); }); + it('should show avatar link with popover support', () => { + const avatarLink = findTimelineEntryItem().findComponent(GlAvatarLink); + const { author } = mockWorkItemCommentNote; + + expect(avatarLink.exists()).toBe(true); + expect(avatarLink.classes()).toContain('js-user-link'); + expect(avatarLink.attributes()).toMatchObject({ + href: author.webUrl, + 'data-user-id': '1', + 'data-username': `${author.username}`, + }); + }); + it('should have the note header, actions and body', () => { expect(findTimelineEntryItem().exists()).toBe(true); expect(findNoteHeader().exists()).toBe(true); |