summaryrefslogtreecommitdiff
path: root/spec/frontend/notes/components/note_form_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/notes/components/note_form_spec.js')
-rw-r--r--spec/frontend/notes/components/note_form_spec.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/frontend/notes/components/note_form_spec.js b/spec/frontend/notes/components/note_form_spec.js
index 92137d3190f..abc888cd245 100644
--- a/spec/frontend/notes/components/note_form_spec.js
+++ b/spec/frontend/notes/components/note_form_spec.js
@@ -150,6 +150,16 @@ describe('issue_note_form component', () => {
expect(handleFormUpdate.length).toBe(1);
});
+
+ it('should disable textarea when ctrl+enter is pressed', async () => {
+ textarea.trigger('keydown.enter', { ctrlKey: true });
+
+ expect(textarea.attributes('disabled')).toBeUndefined();
+
+ await nextTick();
+
+ expect(textarea.attributes('disabled')).toBe('disabled');
+ });
});
});