summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jschatz@gitlab.com>2018-03-21 15:45:23 -0400
committerJacob Schatz <jschatz@gitlab.com>2018-03-21 15:45:23 -0400
commite1213ff6ae1750f7b08caed73089e3ffb0951c73 (patch)
tree343882f511ef894fbdf3c728aeb020f09282ff3d
parent32ce1e3a00149f3dea00d4e65c6e5e7d7b5862f5 (diff)
downloadgitlab-ce-e1213ff6ae1750f7b08caed73089e3ffb0951c73.tar.gz
Adds tests
-rw-r--r--spec/javascripts/notes_spec.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/javascripts/notes_spec.js b/spec/javascripts/notes_spec.js
index 8f317b06792..1858d6b6474 100644
--- a/spec/javascripts/notes_spec.js
+++ b/spec/javascripts/notes_spec.js
@@ -549,6 +549,20 @@ import timeoutPromise from './helpers/set_timeout_promise_helper';
});
});
+ it('should disable the submit button when comment button is clicked', (done) => {
+ expect($form.find('.js-comment-submit-button').is(':disabled')).toEqual(false);
+
+ mockNotesPost();
+ $('.js-comment-button').click();
+ expect($form.find('.js-comment-submit-button').is(':disabled')).toEqual(true);
+
+ setTimeout(() => {
+ expect($form.find('.js-comment-submit-button').is(':disabled')).toEqual(false);
+
+ done();
+ });
+ });
+
it('should show actual note element when new comment is done posting', (done) => {
mockNotesPost();