diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /spec/frontend/notes/components/noteable_note_spec.js | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/frontend/notes/components/noteable_note_spec.js')
-rw-r--r-- | spec/frontend/notes/components/noteable_note_spec.js | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/spec/frontend/notes/components/noteable_note_spec.js b/spec/frontend/notes/components/noteable_note_spec.js index fc238feb974..a08e86d92d3 100644 --- a/spec/frontend/notes/components/noteable_note_spec.js +++ b/spec/frontend/notes/components/noteable_note_spec.js @@ -83,18 +83,34 @@ describe('issue_note', () => { }); }); - it('should render multiline comment if editing discussion root', () => { - wrapper.setProps({ discussionRoot: true }); - wrapper.vm.isEditing = true; - - return wrapper.vm.$nextTick().then(() => { - expect(findMultilineComment().exists()).toBe(true); + it('should only render if it has everything it needs', () => { + const position = { + line_range: { + start: { + line_code: 'abc_1_1', + type: null, + old_line: '', + new_line: '', + }, + end: { + line_code: 'abc_2_2', + type: null, + old_line: '2', + new_line: '2', + }, + }, + }; + const line = { + line_code: 'abc_1_1', + type: null, + old_line: '1', + new_line: '1', + }; + wrapper.setProps({ + note: { ...note, position }, + discussionRoot: true, + line, }); - }); - - it('should not render multiline comment form unless it is the discussion root', () => { - wrapper.setProps({ discussionRoot: false }); - wrapper.vm.isEditing = true; return wrapper.vm.$nextTick().then(() => { expect(findMultilineComment().exists()).toBe(false); |