From c2f82202a6530e7610c510db99011f6508f1b031 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Thu, 10 Nov 2022 15:03:21 +0100 Subject: [PATCH] sanitize image_name by removing all questions marks Co-Authored-By: David Cook --- spec/system/support/cuprite_helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/system/support/cuprite_helpers.rb b/spec/system/support/cuprite_helpers.rb index 0ec2d66335..6ca079c6a5 100644 --- a/spec/system/support/cuprite_helpers.rb +++ b/spec/system/support/cuprite_helpers.rb @@ -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.