Commit 043810f7 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix runtime QA browser and capturing screenshots

[ci skip]
parent fc00d739
...@@ -6,7 +6,7 @@ require 'selenium-webdriver' ...@@ -6,7 +6,7 @@ require 'selenium-webdriver'
module QA module QA
module Runtime module Runtime
class Browser class Browser
include Scenario::Actable include QA::Scenario::Actable
def initialize def initialize
self.class.configure! self.class.configure!
...@@ -63,9 +63,11 @@ module QA ...@@ -63,9 +63,11 @@ module QA
block.call if block_given? block.call if block_given?
rescue rescue
raise if block.nil?
# RSpec examples will take care of screenshots on their own # RSpec examples will take care of screenshots on their own
# #
unless block.binding.receiver.class < RSpec::Core::ExampleGroup unless block.binding.receiver.is_a?(RSpec::Core::ExampleGroup)
Capybara::Screenshot.screenshot_and_save_page Capybara::Screenshot.screenshot_and_save_page
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