diff options
Diffstat (limited to 'spec/frontend/batch_comments/components/draft_note_spec.js')
-rw-r--r-- | spec/frontend/batch_comments/components/draft_note_spec.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/frontend/batch_comments/components/draft_note_spec.js b/spec/frontend/batch_comments/components/draft_note_spec.js index c2d488a465e..5d22823e974 100644 --- a/spec/frontend/batch_comments/components/draft_note_spec.js +++ b/spec/frontend/batch_comments/components/draft_note_spec.js @@ -1,5 +1,6 @@ import { getByRole } from '@testing-library/dom'; import { shallowMount, createLocalVue } from '@vue/test-utils'; +import { stubComponent } from 'helpers/stub_component'; import DraftNote from '~/batch_comments/components/draft_note.vue'; import { createStore } from '~/batch_comments/stores'; import NoteableNote from '~/notes/components/noteable_note.vue'; @@ -8,6 +9,14 @@ import { createDraft } from '../mock_data'; const localVue = createLocalVue(); +const NoteableNoteStub = stubComponent(NoteableNote, { + template: ` + <div> + <slot name="note-header-info">Test</slot> + </div> + `, +}); + describe('Batch comments draft note component', () => { let store; let wrapper; @@ -26,6 +35,9 @@ describe('Batch comments draft note component', () => { store, propsData, localVue, + stubs: { + NoteableNote: NoteableNoteStub, + }, }); jest.spyOn(wrapper.vm.$store, 'dispatch').mockImplementation(); |