mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-27 06:05:19 +00:00
sanitize image_name by removing all questions marks
Co-Authored-By: David Cook <david@redcliffs.net>
This commit is contained in:
@@ -16,7 +16,7 @@ module CupriteHelpers
|
||||
# Use our `Capybara.save_path` to store screenshots with other capybara artifacts
|
||||
# (Rails screenshots path is not configurable https://github.com/rails/rails/blob/49baf092439fc74fc3377b12e3334c3dd9d0752f/actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#L79)
|
||||
def absolute_image_path
|
||||
Rails.root.join("#{Capybara.save_path}/screenshots/#{image_name}.png")
|
||||
Rails.root.join("#{Capybara.save_path}/screenshots/#{image_name.parameterize}.png")
|
||||
end
|
||||
|
||||
# Make failure screenshots compatible with multi-session setup.
|
||||
|
||||
Reference in New Issue
Block a user