summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-12-11 14:16:42 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-12-11 14:16:42 +0100
commitde7901ff59b9a4070b1355ecc2098b33e3674de9 (patch)
treeaf79867b2e87f2d97623e4ce4cc3bf2c004f3c1e
parentb80dc88441ff251096d23e596f8933cab072912f (diff)
downloadgitlab-ce-de7901ff59b9a4070b1355ecc2098b33e3674de9.tar.gz
Fix minor Rubocop offenses in QA browser runtime
-rw-r--r--qa/qa/page/base.rb4
-rw-r--r--qa/qa/runtime/browser.rb2
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?