diff options
| author | Simon Knox <simon@gitlab.com> | 2018-03-20 17:02:41 +0000 |
|---|---|---|
| committer | Jacob Schatz <jschatz@gitlab.com> | 2018-03-20 17:02:41 +0000 |
| commit | 44fce0b0fdb5d3f8897bf71f336ad14b66a6ce91 (patch) | |
| tree | 0cb7d6a362a73d92b170760f5dd9beedb944ee9b /spec | |
| parent | a2d82d4c5522b6d3668481e2fcfc77b0830ce9b6 (diff) | |
| download | gitlab-ce-44fce0b0fdb5d3f8897bf71f336ad14b66a6ce91.tar.gz | |
Resolve "Loss of input text on comments after preview"
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/javascripts/lib/utils/text_markdown_spec.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/javascripts/lib/utils/text_markdown_spec.js b/spec/javascripts/lib/utils/text_markdown_spec.js index a95a7e2a5be..ca0e7c395a0 100644 --- a/spec/javascripts/lib/utils/text_markdown_spec.js +++ b/spec/javascripts/lib/utils/text_markdown_spec.js @@ -1,4 +1,4 @@ -import textUtils from '~/lib/utils/text_markdown'; +import { insertMarkdownText } from '~/lib/utils/text_markdown'; describe('init markdown', () => { let textArea; @@ -21,7 +21,7 @@ describe('init markdown', () => { textArea.selectionStart = 0; textArea.selectionEnd = 0; - textUtils.insertText(textArea, textArea.value, '*', null, '', false); + insertMarkdownText(textArea, textArea.value, '*', null, '', false); expect(textArea.value).toEqual(`${initialValue}* `); }); @@ -32,7 +32,7 @@ describe('init markdown', () => { textArea.value = initialValue; textArea.setSelectionRange(initialValue.length, initialValue.length); - textUtils.insertText(textArea, textArea.value, '*', null, '', false); + insertMarkdownText(textArea, textArea.value, '*', null, '', false); expect(textArea.value).toEqual(`${initialValue}\n* `); }); @@ -43,7 +43,7 @@ describe('init markdown', () => { textArea.value = initialValue; textArea.setSelectionRange(initialValue.length, initialValue.length); - textUtils.insertText(textArea, textArea.value, '*', null, '', false); + insertMarkdownText(textArea, textArea.value, '*', null, '', false); expect(textArea.value).toEqual(`${initialValue}* `); }); @@ -54,7 +54,7 @@ describe('init markdown', () => { textArea.value = initialValue; textArea.setSelectionRange(initialValue.length, initialValue.length); - textUtils.insertText(textArea, textArea.value, '*', null, '', false); + insertMarkdownText(textArea, textArea.value, '*', null, '', false); expect(textArea.value).toEqual(`${initialValue}* `); }); |
