diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-23 12:10:26 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-23 12:10:26 +0000 |
commit | 5c9f6c66fabf22927e862b2b60362e4ea25b250b (patch) | |
tree | 6ff391dcb7fdd3126f71af9fa4ca5e776a9ecbe3 /spec/frontend/notes/old_notes_spec.js | |
parent | 65fdda8d39a9af414dbe5aa3a385b9bcba00960b (diff) | |
download | gitlab-ce-5c9f6c66fabf22927e862b2b60362e4ea25b250b.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/notes/old_notes_spec.js')
-rw-r--r-- | spec/frontend/notes/old_notes_spec.js | 56 |
1 files changed, 15 insertions, 41 deletions
diff --git a/spec/frontend/notes/old_notes_spec.js b/spec/frontend/notes/old_notes_spec.js index dee4f93f0ce..39c80e111ed 100644 --- a/spec/frontend/notes/old_notes_spec.js +++ b/spec/frontend/notes/old_notes_spec.js @@ -82,9 +82,7 @@ describe.skip('Old Notes (~/notes.js)', () => { it('modifies the Markdown field', () => { const changeEvent = document.createEvent('HTMLEvents'); changeEvent.initEvent('change', true, true); - $('input[type=checkbox]') - .attr('checked', true)[0] - .dispatchEvent(changeEvent); + $('input[type=checkbox]').attr('checked', true)[0].dispatchEvent(changeEvent); expect($('.js-task-list-field.original-task-list').val()).toBe('- [x] Task List Item'); }); @@ -746,12 +744,7 @@ describe.skip('Old Notes (~/notes.js)', () => { .find(`#note_${note.id}`) .find('.js-task-list-container'); - expect( - $updatedNoteEl - .find('.note-text') - .text() - .trim(), - ).toEqual(''); + expect($updatedNoteEl.find('.note-text').text().trim()).toEqual(''); done(); }); @@ -912,26 +905,15 @@ describe.skip('Old Notes (~/notes.js)', () => { expect($tempNote.find('.timeline-icon .avatar').attr('src')).toEqual(currentUserAvatar); expect($tempNote.find('.timeline-content').hasClass('discussion')).toBeFalsy(); - expect( - $tempNoteHeader - .find('.d-none.d-sm-inline-block') - .text() - .trim(), - ).toEqual(currentUserFullname); - - expect( - $tempNoteHeader - .find('.note-headline-light') - .text() - .trim(), - ).toEqual(`@${currentUsername}`); - - expect( - $tempNote - .find('.note-body .note-text p') - .text() - .trim(), - ).toEqual(sampleComment); + expect($tempNoteHeader.find('.d-none.d-sm-inline-block').text().trim()).toEqual( + currentUserFullname, + ); + + expect($tempNoteHeader.find('.note-headline-light').text().trim()).toEqual( + `@${currentUsername}`, + ); + + expect($tempNote.find('.note-body .note-text p').text().trim()).toEqual(sampleComment); }); it('should return constructed placeholder element for discussion note based on form contents', () => { @@ -959,12 +941,9 @@ describe.skip('Old Notes (~/notes.js)', () => { }); const $tempNoteHeader = $tempNote.find('.note-header'); - expect( - $tempNoteHeader - .find('.d-none.d-sm-inline-block') - .text() - .trim(), - ).toEqual('Foo <script>alert("XSS")</script>'); + expect($tempNoteHeader.find('.d-none.d-sm-inline-block').text().trim()).toEqual( + 'Foo <script>alert("XSS")</script>', + ); }); }); @@ -987,12 +966,7 @@ describe.skip('Old Notes (~/notes.js)', () => { expect($tempNote.attr('id')).toEqual(uniqueId); expect($tempNote.hasClass('being-posted')).toBeTruthy(); expect($tempNote.hasClass('fade-in-half')).toBeTruthy(); - expect( - $tempNote - .find('.timeline-content i') - .text() - .trim(), - ).toEqual(sampleCommandDescription); + expect($tempNote.find('.timeline-content i').text().trim()).toEqual(sampleCommandDescription); }); }); |