Skip to content

Instantly share code, notes, and snippets.

@luke-hill
Created June 27, 2017 11:25
Show Gist options
  • Save luke-hill/1a872d2f7ab408ac0f3329ab69d2fd12 to your computer and use it in GitHub Desktop.
Save luke-hill/1a872d2f7ab408ac0f3329ab69d2fd12 to your computer and use it in GitHub Desktop.
After do |scenario|
if Validation.new(@order_ref).cancel_order?
Cancel.cancel_pending_order(@order_ref)
end
if scenario.failed?
$LOG.info("FAILED: #{scenario_name(scenario)}")
$LOG.info("REASON: #{scenario.exception.message}")
Capybara.current_session.save_screenshot(screenshot_name(name_choice(scenario)), full: true)
else
$LOG.info("PASSED: #{scenario_name(scenario)}")
end
$LOG.info("DURATION: #{formatted_time}.")
$LOG.debug("Attempting to quit session.driver for #{scenario_name(scenario)}")
Capybara.current_session.driver.quit
$LOG.info('Quit driver for this scenario')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment