Commit 674b8ca4 authored by anonym's avatar anonym
Browse files

Refactor the PAUSE_ON_FAIL functionality.

A well-placed `pause()` can act as a breakpoint when debugging.
parent 9e8f2246
......@@ -245,3 +245,9 @@ def info_log_artifact_location(type, path)
end
info_log("#{type.capitalize}: #{path}")
end
def pause(message = "Paused")
STDERR.puts
STDERR.puts "#{message} (Press ENTER to continue!)"
STDIN.gets
end
......@@ -199,11 +199,7 @@ After('@product') do |scenario|
info_log
info_log_artifact_location(type, artifact_path)
end
if $config["PAUSE_ON_FAIL"]
STDERR.puts ""
STDERR.puts "Press ENTER to continue running the test suite"
STDIN.gets
end
pause("Scenario failed") if $config["PAUSE_ON_FAIL"]
else
if @video_path && File.exist?(@video_path) && not($config['CAPTURE_ALL'])
FileUtils.rm(@video_path)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment