summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIllya Klymov <xanf@xanf.me>2019-09-10 12:35:11 +0300
committerIllya Klymov <xanf@xanf.me>2019-09-10 12:35:11 +0300
commit3fe0ffffaa1a5681233b9146240e9ff1e40b6914 (patch)
treea323a22e8be241cf3d4903f9cdc0714f89184834
parent1a9cc19ac32eb44adfab65a16f270e9583cf8f08 (diff)
downloadgitlab-ce-3fe0ffffaa1a5681233b9146240e9ff1e40b6914.tar.gz
Fix missing setTimeout in specfix-merge-request-spec
-rw-r--r--spec/javascripts/merge_request_spec.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/javascripts/merge_request_spec.js b/spec/javascripts/merge_request_spec.js
index cadcc15385f..72d6e832aca 100644
--- a/spec/javascripts/merge_request_spec.js
+++ b/spec/javascripts/merge_request_spec.js
@@ -29,15 +29,17 @@ describe('MergeRequest', function() {
mock.restore();
});
- it('modifies the Markdown field', function() {
+ it('modifies the Markdown field', done => {
spyOn($, 'ajax').and.stub();
const changeEvent = document.createEvent('HTMLEvents');
changeEvent.initEvent('change', true, true);
$('input[type=checkbox]')
.attr('checked', true)[0]
.dispatchEvent(changeEvent);
-
- expect($('.js-task-list-field').val()).toBe('- [x] Task List Item');
+ setTimeout(() => {
+ expect($('.js-task-list-field').val()).toBe('- [x] Task List Item');
+ done();
+ });
});
describe('tasklist', () => {