Skip to content

Commit

Permalink
Merge pull request #3630 from akostadinov/master
Browse files Browse the repository at this point in the history
support saving debug info for cucumber outlines
  • Loading branch information
akostadinov authored Nov 20, 2023
2 parents d5a85fb + 0259f93 commit 85ec167
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions features/support/hooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@

After do |scenario| # rubocop:disable Metrics/BlockLength
next unless scenario.failed? # we don't care about working scenarios
next unless scenario.respond_to?(:feature) # example rows dont have feature


if (console_messages = page.driver.try(:console_messages))
puts "Console Messages:", *console_messages
Expand All @@ -93,7 +91,7 @@
end


folder = Pathname.new(scenario.feature.file)
folder = Pathname.new(scenario.location.file)
if folder.absolute?
folder = folder.relative_path_from(Rails.root)
end
Expand Down Expand Up @@ -139,7 +137,6 @@
if (logs = page.driver.browser.manage.logs.get(:browser)).present?
entries = logs.map{ |entry| "[#{entry.level}] #{entry.message}" }

puts *entries
console_log.open('w') do |f|
f.puts *entries
end
Expand Down
Binary file removed features/support/screenshot.png
Binary file not shown.

0 comments on commit 85ec167

Please sign in to comment.