Merge branch 'fix-merge-request-spec' into 'master'
Fix merge_request_spec test See merge request gitlab-org/gitlab-ce!32867
This commit is contained in:
commit
da7d02601c
1 changed files with 5 additions and 3 deletions
|
@ -29,15 +29,17 @@ describe('MergeRequest', function() {
|
||||||
mock.restore();
|
mock.restore();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('modifies the Markdown field', function() {
|
it('modifies the Markdown field', done => {
|
||||||
spyOn($, 'ajax').and.stub();
|
spyOn($, 'ajax').and.stub();
|
||||||
const changeEvent = document.createEvent('HTMLEvents');
|
const changeEvent = document.createEvent('HTMLEvents');
|
||||||
changeEvent.initEvent('change', true, true);
|
changeEvent.initEvent('change', true, true);
|
||||||
$('input[type=checkbox]')
|
$('input[type=checkbox]')
|
||||||
.attr('checked', true)[0]
|
.attr('checked', true)[0]
|
||||||
.dispatchEvent(changeEvent);
|
.dispatchEvent(changeEvent);
|
||||||
|
setTimeout(() => {
|
||||||
expect($('.js-task-list-field').val()).toBe('- [x] Task List Item');
|
expect($('.js-task-list-field').val()).toBe('- [x] Task List Item');
|
||||||
|
done();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('tasklist', () => {
|
describe('tasklist', () => {
|
||||||
|
|
Loading…
Reference in a new issue