diff options
author | Felipe Artur <fcardozo@gitlab.com> | 2018-06-21 15:22:40 +0300 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2018-06-21 15:22:40 +0300 |
commit | 3e66795ef1ff1228906239763910b051d8afcc37 (patch) | |
tree | df6424d9ec008f5d1da455f8465681b371c4a11e /spec/javascripts/shortcuts_spec.js | |
parent | 14e35ac9b19d358d84e0cfd167f74036937285b6 (diff) |
Changes tab VUE refactoring
Diffstat (limited to 'spec/javascripts/shortcuts_spec.js')
-rw-r--r-- | spec/javascripts/shortcuts_spec.js | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/spec/javascripts/shortcuts_spec.js b/spec/javascripts/shortcuts_spec.js index ee92295ef5e..94cded7ee37 100644 --- a/spec/javascripts/shortcuts_spec.js +++ b/spec/javascripts/shortcuts_spec.js @@ -2,10 +2,11 @@ import $ from 'jquery'; import Shortcuts from '~/shortcuts'; describe('Shortcuts', () => { - const fixtureName = 'merge_requests/diff_comment.html.raw'; - const createEvent = (type, target) => $.Event(type, { - target, - }); + const fixtureName = 'snippets/show.html.raw'; + const createEvent = (type, target) => + $.Event(type, { + target, + }); preloadFixtures(fixtureName); @@ -21,19 +22,19 @@ describe('Shortcuts', () => { it('focuses preview button in form', () => { Shortcuts.toggleMarkdownPreview( - createEvent('KeyboardEvent', document.querySelector('.js-new-note-form .js-note-text'), - )); + createEvent('KeyboardEvent', document.querySelector('.js-new-note-form .js-note-text')), + ); expect('focus').toHaveBeenTriggeredOn('.js-new-note-form .js-md-preview-button'); }); - it('focues preview button inside edit comment form', (done) => { + it('focues preview button inside edit comment form', done => { document.querySelector('.js-note-edit').click(); setTimeout(() => { Shortcuts.toggleMarkdownPreview( - createEvent('KeyboardEvent', document.querySelector('.edit-note .js-note-text'), - )); + createEvent('KeyboardEvent', document.querySelector('.edit-note .js-note-text')), + ); expect('focus').not.toHaveBeenTriggeredOn('.js-new-note-form .js-md-preview-button'); expect('focus').toHaveBeenTriggeredOn('.edit-note .js-md-preview-button'); |