Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Ross <ragesoss@gmail.com>2021-12-31 02:10:36 +0300
committerBenjamin Neff <benjamin@coding4coffee.ch>2022-06-19 20:29:57 +0300
commit4588ce11c93ca955934d32179a918850a4412e3a (patch)
treebf2eeefe3da2656e41a321d6ea1f43f779e9843c /features
parentd14036b63093c60fa32d11b3597cc75404b1c584 (diff)
Replace "execute_script" for uploading images in specs
Diffstat (limited to 'features')
-rw-r--r--features/support/publishing_cuke_helpers.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/features/support/publishing_cuke_helpers.rb b/features/support/publishing_cuke_helpers.rb
index 57997ccc4..73dc02e27 100644
--- a/features/support/publishing_cuke_helpers.rb
+++ b/features/support/publishing_cuke_helpers.rb
@@ -27,9 +27,9 @@ module PublishingCukeHelpers
end
def upload_file_with_publisher(path)
- page.execute_script(%q{$("input[name='qqfile']").css("opacity", '1');})
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
page.assert_selector(".publisher_photo.loading", count: 0)
end