Commit 716406bc authored by Bryce Johnson's avatar Bryce Johnson

Back off the array spreading, bc poltergeist freaks out.

parent eb866dfe
...@@ -296,10 +296,9 @@ ...@@ -296,10 +296,9 @@
}; };
Dispatcher.prototype.initFieldErrors = function() { Dispatcher.prototype.initFieldErrors = function() {
var flaggedForms = document.querySelectorAll('.show-gl-field-errors'); $('.show-gl-field-errors').each((i, form) => {
return [...flaggedForms].forEach(function(form) { new gl.GlFieldErrors(form);
new gl.GlFieldErrors(form); });
});
}; };
return Dispatcher; return Dispatcher;
......
...@@ -20,7 +20,7 @@ feature 'Merge Requests > User uses slash commands', feature: true, js: true do ...@@ -20,7 +20,7 @@ feature 'Merge Requests > User uses slash commands', feature: true, js: true do
login_with(user) login_with(user)
visit namespace_project_merge_request_path(project.namespace, project, merge_request) visit namespace_project_merge_request_path(project.namespace, project, merge_request)
end end
after do after do
wait_for_ajax wait_for_ajax
end end
...@@ -34,7 +34,7 @@ feature 'Merge Requests > User uses slash commands', feature: true, js: true do ...@@ -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(page).to have_content 'Your commands have been executed!'
expect(merge_request.reload.work_in_progress?).to eq true expect(merge_request.reload.work_in_progress?).to eq true
end end
it 'removes the WIP: prefix from the title' do it 'removes the WIP: prefix from the title' do
merge_request.title = merge_request.wip_title merge_request.title = merge_request.wip_title
...@@ -45,7 +45,7 @@ feature 'Merge Requests > User uses slash commands', feature: true, js: true do ...@@ -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(page).to have_content 'Your commands have been executed!'
expect(merge_request.reload.work_in_progress?).to eq false expect(merge_request.reload.work_in_progress?).to eq false
end end
end end
context 'when the current user cannot toggle the WIP prefix' do context 'when the current user cannot toggle the WIP prefix' do
......
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