aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2017-11-29 10:54:56 -0500
committereileencodes <eileencodes@gmail.com>2017-11-29 10:56:10 -0500
commit9d6e288ee96d6241f864dbf90211c37b14a57632 (patch)
tree89084bf0b0eadca0f052cc00ed80204c927a2988 /actionpack/test
parent527ad1a32c2baf2a78c73104ac8aa52b39514f1f (diff)
downloadrails-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/test')
-rw-r--r--actionpack/test/dispatch/system_testing/screenshot_helper_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb b/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb
index 2afda31cf5..264844fc7d 100644
--- a/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb
+++ b/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb
@@ -35,6 +35,11 @@ class ScreenshotHelperTest < ActiveSupport::TestCase
end
end
+ test "defaults to simple output for the screenshot" do
+ new_test = DrivenBySeleniumWithChrome.new("x")
+ assert_equal "simple", new_test.send(:output_type)
+ end
+
test "display_image return artifact format when specify RAILS_SYSTEM_TESTING_SCREENSHOT environment" do
begin
original_output_type = ENV["RAILS_SYSTEM_TESTING_SCREENSHOT"]
@@ -42,6 +47,8 @@ class ScreenshotHelperTest < ActiveSupport::TestCase
new_test = DrivenBySeleniumWithChrome.new("x")
+ assert_equal "artifact", new_test.send(:output_type)
+
Rails.stub :root, Pathname.getwd do
new_test.stub :passed?, false do
assert_match %r|url=artifact://.+?tmp/screenshots/failures_x\.png|, new_test.send(:display_image)