Created
June 27, 2017 11:25
-
-
Save luke-hill/1a872d2f7ab408ac0f3329ab69d2fd12 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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