diff options
author | Samantha Ming <sming@gitlab.com> | 2019-06-21 10:10:05 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-06-21 10:10:05 +0000 |
commit | 08359a8ebcb7fc2c0f996b43186e826ddbec9554 (patch) | |
tree | b4ddafc9d825f19cf87cf0dc6b791d43646feaf5 /spec/javascripts | |
parent | 75b3f26a6c33a373942d14d715b4bdf70c7daad2 (diff) | |
download | gitlab-ce-08359a8ebcb7fc2c0f996b43186e826ddbec9554.tar.gz |
Add back trimChar method to remove trailing +/-
Add test for checking output
Diffstat (limited to 'spec/javascripts')
-rw-r--r-- | spec/javascripts/notes/components/diff_with_note_spec.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/javascripts/notes/components/diff_with_note_spec.js b/spec/javascripts/notes/components/diff_with_note_spec.js index 0752bd05904..f849fe9d8bb 100644 --- a/spec/javascripts/notes/components/diff_with_note_spec.js +++ b/spec/javascripts/notes/components/diff_with_note_spec.js @@ -47,6 +47,19 @@ describe('diff_with_note', () => { vm = mountComponentWithStore(Component, { props, store }); }); + it('removes trailing "+" char', () => { + const richText = vm.$el.querySelectorAll('.line_holder')[4].querySelector('.line_content') + .textContent[0]; + + expect(richText).not.toEqual('+'); + }); + + it('removes trailing "-" char', () => { + const richText = vm.$el.querySelector('#LC13').parentNode.textContent[0]; + + expect(richText).not.toEqual('-'); + }); + it('shows text diff', () => { expect(selectors.container).toHaveClass('text-file'); expect(selectors.diffTable).toExist(); |