Fix single note edit form specs.
This commit is contained in:
parent
0143573dd5
commit
183a52f8e1
3 changed files with 6 additions and 4 deletions
|
@ -56,7 +56,7 @@
|
|||
// We are in the Merge Requests page so we need another edit form for Changes tab
|
||||
if (gl.utils.getPagePath(1) === 'merge_requests') {
|
||||
$('.note-edit-form').clone()
|
||||
.addClass('mr-discussion-edit-form').insertAfter('.note-edit-form');
|
||||
.addClass('mr-note-edit-form').insertAfter('.note-edit-form');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -569,10 +569,10 @@
|
|||
};
|
||||
|
||||
Notes.prototype.getEditFormSelector = function($el) {
|
||||
var selector = '.note-edit-form:not(.mr-discussion-edit-form)';
|
||||
var selector = '.note-edit-form:not(.mr-note-edit-form)';
|
||||
|
||||
if ($el.parents('#diffs').length) {
|
||||
selector = '.note-edit-form.mr-discussion-edit-form';
|
||||
selector = '.note-edit-form.mr-note-edit-form';
|
||||
}
|
||||
|
||||
return selector;
|
||||
|
|
|
@ -71,7 +71,8 @@ describe 'Comments', feature: true do
|
|||
|
||||
describe 'when editing a note', js: true do
|
||||
it 'there should be a hidden edit form' do
|
||||
is_expected.to have_css('.note-edit-form', visible: false, count: 1)
|
||||
is_expected.to have_css('.note-edit-form:not(.mr-note-edit-form)', visible: false, count: 1)
|
||||
is_expected.to have_css('.note-edit-form.mr-note-edit-form', visible: false, count: 1)
|
||||
end
|
||||
|
||||
describe 'editing the note' do
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
fixture.load(commentsTemplate);
|
||||
gl.utils.disableButtonIfEmptyField = _.noop;
|
||||
window.project_uploads_path = 'http://test.host/uploads';
|
||||
$('body').data('page', 'projects:issues:show');
|
||||
});
|
||||
|
||||
describe('task lists', function() {
|
||||
|
|
Loading…
Reference in a new issue