From de7901ff59b9a4070b1355ecc2098b33e3674de9 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 11 Dec 2017 14:16:42 +0100 Subject: Fix minor Rubocop offenses in QA browser runtime --- qa/qa/page/base.rb | 4 +++- qa/qa/runtime/browser.rb | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/qa/qa/page/base.rb b/qa/qa/page/base.rb index 4e1a55337c9..49b16790337 100644 --- a/qa/qa/page/base.rb +++ b/qa/qa/page/base.rb @@ -13,8 +13,10 @@ module QA def wait(css = '.application', time: 60) Time.now.tap do |start| while Time.now - start < time - break if page.has_css?(css, wait: 5) puts "Waiting for `#{css} on `#{current_url}`" + + break if page.has_css?(css, wait: 5) + refresh end end diff --git a/qa/qa/runtime/browser.rb b/qa/qa/runtime/browser.rb index e05dd9612df..96b3e144f99 100644 --- a/qa/qa/runtime/browser.rb +++ b/qa/qa/runtime/browser.rb @@ -79,7 +79,7 @@ module QA def perform(&block) visit(@address) - block.call if block_given? + yield if block_given? rescue raise if block.nil? -- cgit v1.2.1