summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2019-09-12 11:02:41 +0000
committerFilipa Lacerda <filipa@gitlab.com>2019-09-12 11:02:41 +0000
commitda7d02601cfa1ebd362a5be060b218b3f23b0e04 (patch)
tree29db61884c18195c23c4f088d992b53fb4919105
parent8ace6442171696de9dce9105d6db45fa0da10550 (diff)
parent3fe0ffffaa1a5681233b9146240e9ff1e40b6914 (diff)
downloadgitlab-ce-da7d02601cfa1ebd362a5be060b218b3f23b0e04.tar.gz
Merge branch 'fix-merge-request-spec' into 'master'
Fix merge_request_spec test See merge request gitlab-org/gitlab-ce!32867
-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', () => {