diff options
author | eileencodes <eileencodes@gmail.com> | 2017-11-29 10:54:56 -0500 |
---|---|---|
committer | eileencodes <eileencodes@gmail.com> | 2017-11-29 10:56:10 -0500 |
commit | 9d6e288ee96d6241f864dbf90211c37b14a57632 (patch) | |
tree | 89084bf0b0eadca0f052cc00ed80204c927a2988 /actionpack/lib | |
parent | 527ad1a32c2baf2a78c73104ac8aa52b39514f1f (diff) | |
download | rails-9d6e288ee96d6241f864dbf90211c37b14a57632.tar.gz rails-9d6e288ee96d6241f864dbf90211c37b14a57632.tar.bz2 rails-9d6e288ee96d6241f864dbf90211c37b14a57632.zip |
Make screenshots default to "simple" format
Not everyone uses iTerm2 and whereas Terminal.app on a mac just ignores
that and outputs the path, other terminals like those on Ubuntu do not.
A friendlier default is one that works by default.
Closes #31159
Closes #30957
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb b/actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb index 6c337cdc31..df0c5d3f0e 100644 --- a/actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb +++ b/actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb @@ -15,12 +15,11 @@ module ActionDispatch # # You can set the +RAILS_SYSTEM_TESTING_SCREENSHOT+ environment variable to # control the output. Possible values are: - # * [+inline+ (default)] display the screenshot in the terminal using the + # * [+simple+ (default)] Only displays the screenshot path. + # This is the default value. + # * [+inline+] Display the screenshot in the terminal using the # iTerm image protocol (https://iterm2.com/documentation-images.html). - # * [+simple+] only display the screenshot path. - # This is the default value if the +CI+ environment variables - # is defined. - # * [+artifact+] display the screenshot in the terminal, using the terminal + # * [+artifact+] Display the screenshot in the terminal, using the terminal # artifact format (https://buildkite.github.io/terminal/inline-images/). def take_screenshot save_image @@ -59,11 +58,8 @@ module ActionDispatch # Environment variables have priority output_type = ENV["RAILS_SYSTEM_TESTING_SCREENSHOT"] || ENV["CAPYBARA_INLINE_SCREENSHOT"] - # If running in a CI environment, default to simple - output_type ||= "simple" if ENV["CI"] - - # Default - output_type ||= "inline" + # Default to outputting a path to the screenshot + output_type ||= "simple" output_type end |