aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb
diff options
context:
space:
mode:
authorAidan Haran <aidanharan@yahoo.com>2017-12-09 13:41:02 +0000
committerGitHub <noreply@github.com>2017-12-09 13:41:02 +0000
commit66f34a8ea58c8c98d9cc2651d386c9e5a0789d08 (patch)
treed24e9014cf9045abc892ba97ac993e2e26e31c7e /actionpack/test/dispatch/system_testing/screenshot_helper_test.rb
parent3291fa3630c456450f8c6a9b771f77c293d036cd (diff)
parent55d4cf2a9c1a6e77ed7aedb866e964039bb4a143 (diff)
downloadrails-66f34a8ea58c8c98d9cc2651d386c9e5a0789d08.tar.gz
rails-66f34a8ea58c8c98d9cc2651d386c9e5a0789d08.tar.bz2
rails-66f34a8ea58c8c98d9cc2651d386c9e5a0789d08.zip
Merge branch 'master' into custom-discarded-job-handling
Diffstat (limited to 'actionpack/test/dispatch/system_testing/screenshot_helper_test.rb')
-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)