Commit 183a52f8 authored by Fatih Acet's avatar Fatih Acet

Fix single note edit form specs.

parent 0143573d
......@@ -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() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment