mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-04 07:09:14 +00:00
Merge pull request #9973 from jibees/9972-remove-question-mark-from-capybara-saved-screenshots-in-order-to-save-it-through-ghactions
Sanitize `image_name` by removing all questions marks when saving any capybara screenshots
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