summaryrefslogtreecommitdiff
path: root/spec/javascripts/notes/components
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-03-12 17:08:05 +0000
committerFilipa Lacerda <filipa@gitlab.com>2018-03-12 17:08:05 +0000
commite84c943fa0609d05184cb95c845fa35cc1fcd432 (patch)
tree6055f6c588a10e77af257a02ac3c8cb2c979ef70 /spec/javascripts/notes/components
parentbd26e012fcd50d0ff5c1ad7febc9d6355e43a6fc (diff)
downloadgitlab-ce-44149-issue-comment-buttons.tar.gz
Fix loading icon being visible in the wrong button44149-issue-comment-buttons
Diffstat (limited to 'spec/javascripts/notes/components')
-rw-r--r--spec/javascripts/notes/components/comment_form_spec.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/javascripts/notes/components/comment_form_spec.js b/spec/javascripts/notes/components/comment_form_spec.js
index 90016436cb7..224debbeff6 100644
--- a/spec/javascripts/notes/components/comment_form_spec.js
+++ b/spec/javascripts/notes/components/comment_form_spec.js
@@ -200,6 +200,20 @@ describe('issue_comment_form component', () => {
done();
});
});
+
+ describe('when clicking close/reopen button', () => {
+ it('should disable button and show a loading spinner', (done) => {
+ const toggleStateButton = vm.$el.querySelector('.js-action-button');
+
+ toggleStateButton.click();
+ Vue.nextTick(() => {
+ expect(toggleStateButton.disabled).toEqual(true);
+ expect(toggleStateButton.querySelector('.js-loading-button-icon')).not.toBeNull();
+
+ done();
+ });
+ });
+ });
});
describe('issue is confidential', () => {