diff options
author | Bryce Johnson <bryce@gitlab.com> | 2016-10-12 18:47:31 +0200 |
---|---|---|
committer | Bryce Johnson <bryce@gitlab.com> | 2016-10-15 08:28:55 +0200 |
commit | 716406bc71fc3866588ccca8c132060d4f33e53e (patch) | |
tree | 25b9e568acaad653a4ce232ec9cfbece5cafd123 | |
parent | eb866dfe05c82b2a45da69d924bcbe15b151a054 (diff) | |
download | gitlab-ce-716406bc71fc3866588ccca8c132060d4f33e53e.tar.gz |
Back off the array spreading, bc poltergeist freaks out.
-rw-r--r-- | app/assets/javascripts/dispatcher.js.es6 | 7 | ||||
-rw-r--r-- | spec/features/merge_requests/user_uses_slash_commands_spec.rb | 6 |
2 files changed, 6 insertions, 7 deletions
diff --git a/app/assets/javascripts/dispatcher.js.es6 b/app/assets/javascripts/dispatcher.js.es6 index abc077a404e..f3957ed374b 100644 --- a/app/assets/javascripts/dispatcher.js.es6 +++ b/app/assets/javascripts/dispatcher.js.es6 @@ -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; diff --git a/spec/features/merge_requests/user_uses_slash_commands_spec.rb b/spec/features/merge_requests/user_uses_slash_commands_spec.rb index cb3cea3fd51..7b8af555f0e 100644 --- a/spec/features/merge_requests/user_uses_slash_commands_spec.rb +++ b/spec/features/merge_requests/user_uses_slash_commands_spec.rb @@ -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 |