Commit be4af16c authored by Mark Lapierre's avatar Mark Lapierre

Perform strategy before hooks first

Moves `Runtime::Release.perform_before_hooks` to
`config.before(:suite)` so that it executes before the start of
any tests' `before(:context)` hooks.

Captures a screenshot if there's an error.
parent 3238f7b3
......@@ -66,14 +66,23 @@ module QA
metadata[:type] = :feature
end
config.before do
config.before(:suite) do
unless browser.rspec_configured
browser.rspec_configured = true
##
# Perform before hooks, which are different for CE and EE
#
Runtime::Release.perform_before_hooks
begin
Runtime::Release.perform_before_hooks
rescue
saved = Capybara::Screenshot.screenshot_and_save_page
QA::Runtime::Logger.error("Screenshot: #{saved[:image]}") if saved&.key?(:image)
QA::Runtime::Logger.error("HTML capture: #{saved[:html]}") if saved&.key?(:html)
raise
end
end
end
end
......
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