Adds tests

This commit is contained in:
Jacob Schatz 2018-03-21 15:45:23 -04:00
parent 32ce1e3a00
commit e1213ff6ae
1 changed files with 14 additions and 0 deletions

View File

@ -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();