Back off the array spreading, bc poltergeist freaks out.

This commit is contained in:
Bryce Johnson 2016-10-12 18:47:31 +02:00
parent eb866dfe05
commit 716406bc71
2 changed files with 6 additions and 7 deletions

View File

@ -296,10 +296,9 @@
};
Dispatcher.prototype.initFieldErrors = function() {
var flaggedForms = document.querySelectorAll('.show-gl-field-errors');
return [...flaggedForms].forEach(function(form) {
new gl.GlFieldErrors(form);
});
$('.show-gl-field-errors').each((i, form) => {
new gl.GlFieldErrors(form);
});
};
return Dispatcher;

View File

@ -20,7 +20,7 @@ feature 'Merge Requests > User uses slash commands', feature: true, js: true do
login_with(user)
visit namespace_project_merge_request_path(project.namespace, project, merge_request)
end
after do
wait_for_ajax
end
@ -34,7 +34,7 @@ feature 'Merge Requests > User uses slash commands', feature: true, js: true do
expect(page).to have_content 'Your commands have been executed!'
expect(merge_request.reload.work_in_progress?).to eq true
end
end
it 'removes the WIP: prefix from the title' do
merge_request.title = merge_request.wip_title
@ -45,7 +45,7 @@ feature 'Merge Requests > User uses slash commands', feature: true, js: true do
expect(page).to have_content 'Your commands have been executed!'
expect(merge_request.reload.work_in_progress?).to eq false
end
end
end
context 'when the current user cannot toggle the WIP prefix' do