Commit de7901ff authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix minor Rubocop offenses in QA browser runtime

parent b80dc884
...@@ -13,8 +13,10 @@ module QA ...@@ -13,8 +13,10 @@ module QA
def wait(css = '.application', time: 60) def wait(css = '.application', time: 60)
Time.now.tap do |start| Time.now.tap do |start|
while Time.now - start < time while Time.now - start < time
break if page.has_css?(css, wait: 5)
puts "Waiting for `#{css} on `#{current_url}`" puts "Waiting for `#{css} on `#{current_url}`"
break if page.has_css?(css, wait: 5)
refresh refresh
end end
end end
......
...@@ -79,7 +79,7 @@ module QA ...@@ -79,7 +79,7 @@ module QA
def perform(&block) def perform(&block)
visit(@address) visit(@address)
block.call if block_given? yield if block_given?
rescue rescue
raise if block.nil? raise if block.nil?
......
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