summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanad Liaquat <sliaquat@gitlab.com>2019-07-12 11:31:49 +0500
committerSanad Liaquat <sliaquat@gitlab.com>2019-07-12 11:31:49 +0500
commitf4a4f6e28aaaaa157ab6bc91d41a22cdea4fab8a (patch)
tree04fef2081772be06dafc18fee1dae45b61c5c6a2
parent0b71325dc00ac459636625e743133c0bc0b4cb33 (diff)
downloadgitlab-ce-f4a4f6e28aaaaa157ab6bc91d41a22cdea4fab8a.tar.gz
Fix page refresh in retry_untilqa-nightly-115-fix-retry-until
-rw-r--r--qa/qa/page/base.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb2
-rw-r--r--qa/qa/support/retrier.rb6
3 files changed, 5 insertions, 5 deletions
diff --git a/qa/qa/page/base.rb b/qa/qa/page/base.rb
index 130e5e33ab4..80ce23d5c38 100644
--- a/qa/qa/page/base.rb
+++ b/qa/qa/page/base.rb
@@ -26,7 +26,7 @@ module QA
end
def retry_until(max_attempts: 3, reload: false, sleep_interval: 0)
- QA::Support::Retrier.retry_until(max_attempts: max_attempts, reload: reload, sleep_interval: sleep_interval) do
+ QA::Support::Retrier.retry_until(max_attempts: max_attempts, reload_page: (reload && self), sleep_interval: sleep_interval) do
yield
end
end
diff --git a/qa/qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb
index 5cd6bac3f5a..09d1d3fe76e 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb
@@ -11,7 +11,7 @@ module QA
expect(menu).to have_personal_area
end
- Support::Retrier.retry_until(reload: false, sleep_interval: 0.5) do
+ Support::Retrier.retry_until(sleep_interval: 0.5) do
Page::Main::Menu.perform(&:sign_out)
Page::Main::Login.perform(&:has_sign_in_tab?)
diff --git a/qa/qa/support/retrier.rb b/qa/qa/support/retrier.rb
index 230cec8f8d2..720f1d17037 100644
--- a/qa/qa/support/retrier.rb
+++ b/qa/qa/support/retrier.rb
@@ -24,8 +24,8 @@ module QA
end
end
- def retry_until(max_attempts: 3, reload: false, sleep_interval: 0)
- QA::Runtime::Logger.debug("with retry_until: max_attempts #{max_attempts}; sleep_interval #{sleep_interval}; reload:#{reload}")
+ def retry_until(max_attempts: 3, reload_page: nil, sleep_interval: 0)
+ QA::Runtime::Logger.debug("with retry_until: max_attempts #{max_attempts}; sleep_interval #{sleep_interval}; reload_page:#{reload_page}")
attempts = 0
while attempts < max_attempts
@@ -35,7 +35,7 @@ module QA
sleep sleep_interval
- refresh if reload
+ reload_page.refresh if reload_page
attempts += 1
end