diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-05-31 16:35:54 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-05-31 16:35:54 +0000 |
commit | bfa46a9eabbad40ab57454fd7233d8c3e199ed98 (patch) | |
tree | 814018af8930155eb4aaabe60410801e71ed921a /spec | |
parent | 882a591dcafd325f90fa3905a9ffee9b1e607676 (diff) | |
parent | 760493a211d5d013eff1fd4c223f6da1c0efe16a (diff) | |
download | gitlab-ce-bfa46a9eabbad40ab57454fd7233d8c3e199ed98.tar.gz |
Merge branch 'task-list-2' into 'master'
Update task_list to version 2.0.0
Closes #22470
See merge request !11525
Diffstat (limited to 'spec')
-rw-r--r-- | spec/javascripts/merge_request_spec.js | 4 | ||||
-rw-r--r-- | spec/javascripts/notes_spec.js | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/spec/javascripts/merge_request_spec.js b/spec/javascripts/merge_request_spec.js index 1173fa40947..f444bcaf847 100644 --- a/spec/javascripts/merge_request_spec.js +++ b/spec/javascripts/merge_request_spec.js @@ -13,7 +13,9 @@ import '~/merge_request'; }); it('modifies the Markdown field', function() { spyOn(jQuery, 'ajax').and.stub(); - $('input[type=checkbox]').attr('checked', true).trigger('change'); + const changeEvent = document.createEvent('HTMLEvents'); + changeEvent.initEvent('change', true, true); + $('input[type=checkbox]').attr('checked', true)[0].dispatchEvent(changeEvent); return expect($('.js-task-list-field').val()).toBe('- [x] Task List Item'); }); return it('submits an ajax request on tasklist:changed', function() { diff --git a/spec/javascripts/notes_spec.js b/spec/javascripts/notes_spec.js index 04cf0fe2bf8..17aa70ff3f1 100644 --- a/spec/javascripts/notes_spec.js +++ b/spec/javascripts/notes_spec.js @@ -34,7 +34,9 @@ import '~/notes'; }); it('modifies the Markdown field', function() { - $('input[type=checkbox]').attr('checked', true).trigger('change'); + 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'); }); |