BigW Consortium Gitlab

fix rubocop (oops)

parent b673fcc1
...@@ -17,13 +17,13 @@ feature 'GFM autocomplete', :js do ...@@ -17,13 +17,13 @@ feature 'GFM autocomplete', :js do
end end
after do after do
execute_script("localStorage.clear();"); execute_script("localStorage.clear();")
end end
it 'updates issue descripton with GFM reference' do it 'updates issue descripton with GFM reference' do
find('.issuable-edit').click find('.issuable-edit').click
simulateInput('#issue-description', "@#{user.name[0...3]}") simulate_input('#issue-description', "@#{user.name[0...3]}")
find('.atwho-view .cur').click find('.atwho-view .cur').click
...@@ -106,7 +106,7 @@ feature 'GFM autocomplete', :js do ...@@ -106,7 +106,7 @@ feature 'GFM autocomplete', :js do
it 'includes items for assignee dropdowns with non-ASCII characters in name' do it 'includes items for assignee dropdowns with non-ASCII characters in name' do
page.within '.timeline-content-form' do page.within '.timeline-content-form' do
find('#note-body').native.send_keys('') find('#note-body').native.send_keys('')
simulateInput('#note-body', "@#{user.name[0...8]}"); simulate_input('#note-body', "@#{user.name[0...8]}")
end end
expect(page).to have_selector('.atwho-container') expect(page).to have_selector('.atwho-container')
...@@ -134,7 +134,7 @@ feature 'GFM autocomplete', :js do ...@@ -134,7 +134,7 @@ feature 'GFM autocomplete', :js do
note = find('#note-body') note = find('#note-body')
page.within '.timeline-content-form' do page.within '.timeline-content-form' do
note.native.send_keys('') note.native.send_keys('')
simulateInput('#note-body', "~#{label.title[0]}") simulate_input('#note-body', "~#{label.title[0]}")
note.click note.click
end end
......
...@@ -12,7 +12,7 @@ feature 'Issue markdown toolbar', :js do ...@@ -12,7 +12,7 @@ feature 'Issue markdown toolbar', :js do
end end
after do after do
execute_script("localStorage.clear();"); execute_script("localStorage.clear();")
end end
it "doesn't include first new line when adding bold" do it "doesn't include first new line when adding bold" do
......
# see app/assets/javascripts/test_utils/simulate_input.js # see app/assets/javascripts/test_utils/simulate_input.js
module InputHelper module InputHelper
def simulateInput(selector, input = '') def simulate_input(selector, input = '')
evaluate_script("window.simulateInput(#{selector.to_json}, #{input.to_json});") evaluate_script("window.simulateInput(#{selector.to_json}, #{input.to_json});")
end end
end end
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