diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /spec/frontend/notes/components/discussion_notes_spec.js | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'spec/frontend/notes/components/discussion_notes_spec.js')
-rw-r--r-- | spec/frontend/notes/components/discussion_notes_spec.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/spec/frontend/notes/components/discussion_notes_spec.js b/spec/frontend/notes/components/discussion_notes_spec.js index cd24b9afbdf..59ac75f00e6 100644 --- a/spec/frontend/notes/components/discussion_notes_spec.js +++ b/spec/frontend/notes/components/discussion_notes_spec.js @@ -1,5 +1,5 @@ import { getByRole } from '@testing-library/dom'; -import { shallowMount } from '@vue/test-utils'; +import { shallowMount, mount } from '@vue/test-utils'; import '~/behaviors/markdown/render_gfm'; import DiscussionNotes from '~/notes/components/discussion_notes.vue'; import NoteableNote from '~/notes/components/noteable_note.vue'; @@ -23,8 +23,8 @@ describe('DiscussionNotes', () => { let wrapper; const getList = () => getByRole(wrapper.element, 'list'); - const createComponent = (props) => { - wrapper = shallowMount(DiscussionNotes, { + const createComponent = (props, mountingMethod = shallowMount) => { + wrapper = mountingMethod(DiscussionNotes, { store, propsData: { discussion: discussionMock, @@ -33,7 +33,11 @@ describe('DiscussionNotes', () => { ...props, }, scopedSlots: { - footer: '<p slot-scope="{ showReplies }">showReplies:{{showReplies}}</p>', + footer: ` + <template #default="{ showReplies }"> + <p>showReplies:{{ showReplies }}</p>, + </template> + `, }, slots: { 'avatar-badge': '<span class="avatar-badge-slot-content" />', @@ -112,7 +116,7 @@ describe('DiscussionNotes', () => { }); it('passes down avatar-badge slot content', () => { - createComponent(); + createComponent({}, mount); expect(wrapper.find('.avatar-badge-slot-content').exists()).toBe(true); }); }); |