diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-08-04 21:37:02 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-08-04 21:37:02 +0300 |
commit | a432ae9d06f7dc28d0825e87bafb33a04ae3cf20 (patch) | |
tree | c31f2fa80b8b9c09f9c34f90ae010be6ff8c4f27 | |
parent | 667f8b53ee63e4e1e14ae90d39cc4ec717cf872b (diff) |
Tests
-rw-r--r-- | app/assets/javascripts/notes/components/issue_note_form.vue | 2 | ||||
-rw-r--r-- | spec/javascripts/awards_handler_spec.js | 1 | ||||
-rw-r--r-- | spec/javascripts/behaviors/quick_submit_spec.js | 6 |
3 files changed, 5 insertions, 4 deletions
diff --git a/app/assets/javascripts/notes/components/issue_note_form.vue b/app/assets/javascripts/notes/components/issue_note_form.vue index 3b1ff05b480..731080fd396 100644 --- a/app/assets/javascripts/notes/components/issue_note_form.vue +++ b/app/assets/javascripts/notes/components/issue_note_form.vue @@ -118,7 +118,7 @@ </div> <div class="flash-container timeline-content"></div> <form - class="edit-note common-note-form"> + class="edit-note common-note-form js-vue-quick-submit"> <markdown-field :markdown-preview-url="markdownPreviewUrl" :markdown-docs="markdownDocsUrl" diff --git a/spec/javascripts/awards_handler_spec.js b/spec/javascripts/awards_handler_spec.js index 8e056882108..c90970b7ba1 100644 --- a/spec/javascripts/awards_handler_spec.js +++ b/spec/javascripts/awards_handler_spec.js @@ -28,6 +28,7 @@ import '~/lib/utils/common_utils'; preloadFixtures('issues/issue_with_comment.html.raw'); beforeEach(function(done) { loadFixtures('issues/issue_with_comment.html.raw'); + $('body').data('page', 'projects:issues:show'); loadAwardsHandler(true).then((obj) => { awardsHandler = obj; spyOn(awardsHandler, 'postEmoji').and.callFake((button, url, emoji, cb) => cb()); diff --git a/spec/javascripts/behaviors/quick_submit_spec.js b/spec/javascripts/behaviors/quick_submit_spec.js index 6dc48f9a293..0d3f3e9673a 100644 --- a/spec/javascripts/behaviors/quick_submit_spec.js +++ b/spec/javascripts/behaviors/quick_submit_spec.js @@ -38,19 +38,19 @@ import '~/behaviors/quick_submit'; return expect(this.spies.submit).not.toHaveBeenTriggered(); }); it('disables input of type submit', function() { - const submitButton = $('.js-quick-submit input[type=submit]'); + const submitButton = $('.js-vue-quick-submit input[type=submit]'); this.textarea.trigger(keydownEvent()); expect(submitButton).toBeDisabled(); }); it('disables button of type submit', function() { - const submitButton = $('.js-quick-submit input[type=submit]'); + const submitButton = $('.js-vue-quick-submit input[type=submit]'); this.textarea.trigger(keydownEvent()); expect(submitButton).toBeDisabled(); }); it('only clicks one submit', function() { - const existingSubmit = $('.js-quick-submit input[type=submit]'); + const existingSubmit = $('.js-vue-quick-submit input[type=submit]'); // Add an extra submit button const newSubmit = $('<button type="submit">Submit it</button>'); newSubmit.insertAfter(this.textarea); |