diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2019-02-26 19:03:00 +0100 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2019-03-21 17:14:44 +0100 |
commit | 93c27c3b22fe597a2321a19911e84fd0abd93a0b (patch) | |
tree | 70a8c0821057c0e46ae3b1d9fefd5a2841d78ba6 | |
parent | f5ce678dfeb3949968e6d1222d873a65fa72c0c1 (diff) | |
download | gitlab-ce-93c27c3b22fe597a2321a19911e84fd0abd93a0b.tar.gz |
Validate NoteForm props in noteable_discussion_spec.js
-rw-r--r-- | spec/javascripts/notes/components/noteable_discussion_spec.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/javascripts/notes/components/noteable_discussion_spec.js b/spec/javascripts/notes/components/noteable_discussion_spec.js index 2b93fb9fb45..bd94dfb9285 100644 --- a/spec/javascripts/notes/components/noteable_discussion_spec.js +++ b/spec/javascripts/notes/components/noteable_discussion_spec.js @@ -3,6 +3,7 @@ import createStore from '~/notes/stores'; import noteableDiscussion from '~/notes/components/noteable_discussion.vue'; import ReplyPlaceholder from '~/notes/components/discussion_reply_placeholder.vue'; import ResolveWithIssueButton from '~/notes/components/discussion_resolve_with_issue_button.vue'; +import NoteForm from '~/notes/components/note_form.vue'; import '~/behaviors/markdown/render_gfm'; import { noteableDataMock, discussionMock, notesDataMock } from '../mock_data'; import mockDiffFile from '../../diffs/mock_data/diff_file'; @@ -72,7 +73,17 @@ describe('noteable_discussion component', () => { .then(() => wrapper.vm.$nextTick()) .then(() => { expect(wrapper.vm.isReplying).toEqual(true); - expect(wrapper.vm.$refs.noteForm).not.toBeNull(); + + const noteForm = wrapper.find(NoteForm); + + expect(noteForm.exists()).toBe(true); + + const noteFormProps = noteForm.props(); + + expect(noteFormProps.discussion).toBe(discussionMock); + expect(noteFormProps.isEditing).toBe(false); + expect(noteFormProps.line).toBe(null); + expect(noteFormProps.saveButtonTitle).toBe('Comment'); }) .then(done) .catch(done.fail); |