Replace "execute_script" for uploading images in specs
This commit is contained in:
parent
d14036b630
commit
4588ce11c9
1 changed files with 2 additions and 2 deletions
|
|
@ -27,9 +27,9 @@ module PublishingCukeHelpers
|
||||||
end
|
end
|
||||||
|
|
||||||
def upload_file_with_publisher(path)
|
def upload_file_with_publisher(path)
|
||||||
page.execute_script(%q{$("input[name='qqfile']").css("opacity", '1');})
|
|
||||||
with_scope("#publisher-textarea-wrapper") do
|
with_scope("#publisher-textarea-wrapper") do
|
||||||
attach_file("qqfile", Rails.root.join(path).to_s)
|
find('input[name="qqfile"]', visible: false)
|
||||||
|
.attach_file(Rails.root.join(path).to_s, make_visible: true)
|
||||||
# wait for the image to be ready
|
# wait for the image to be ready
|
||||||
page.assert_selector(".publisher_photo.loading", count: 0)
|
page.assert_selector(".publisher_photo.loading", count: 0)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue