Commit 54a6bcae authored by Phil Hughes's avatar Phil Hughes

fixed spec/features/projects/files/edit_file_soft_wrap_spec.rb

parent c01338cb
...@@ -7,9 +7,8 @@ feature 'User uses soft wrap whilst editing file', js: true do ...@@ -7,9 +7,8 @@ feature 'User uses soft wrap whilst editing file', js: true do
project.team << [user, :master] project.team << [user, :master]
sign_in user sign_in user
visit project_new_blob_path(project, 'master', file_name: 'test_file-name') visit project_new_blob_path(project, 'master', file_name: 'test_file-name')
editor = find('.file-editor.code') page.within('.file-editor.code') do
editor.click find('.ace_text-input', visible: false).send_keys 'Touch water with paw then recoil in horror chase dog then
editor.send_keys 'Touch water with paw then recoil in horror chase dog then
run away chase the pig around the house eat owner\'s food, and knock run away chase the pig around the house eat owner\'s food, and knock
dish off table head butt cant eat out of my own dish. Cat is love, cat dish off table head butt cant eat out of my own dish. Cat is love, cat
is life rub face on everything poop on grasses so meow. Playing with is life rub face on everything poop on grasses so meow. Playing with
...@@ -20,6 +19,7 @@ feature 'User uses soft wrap whilst editing file', js: true do ...@@ -20,6 +19,7 @@ feature 'User uses soft wrap whilst editing file', js: true do
hanging out of own butt jump off balcony, onto stranger\'s head yet hanging out of own butt jump off balcony, onto stranger\'s head yet
chase laser. Purr for no reason stare at ceiling hola te quiero.'.squish chase laser. Purr for no reason stare at ceiling hola te quiero.'.squish
end end
end
let(:toggle_button) { find('.soft-wrap-toggle') } let(:toggle_button) { find('.soft-wrap-toggle') }
...@@ -36,6 +36,6 @@ feature 'User uses soft wrap whilst editing file', js: true do ...@@ -36,6 +36,6 @@ feature 'User uses soft wrap whilst editing file', js: true do
end end
def get_content_width def get_content_width
find('.ace_content')[:style].slice!(/width: \d+/).slice!(/\d+/) find('.ace_content')[:style].slice!(/width: \d+/).slice!(/\d+/).to_i
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