summaryrefslogtreecommitdiff
path: root/qa/qa
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa')
-rw-r--r--qa/qa/flow/login.rb6
-rw-r--r--qa/qa/page/base.rb4
-rw-r--r--qa/qa/support/page/logging.rb7
-rw-r--r--qa/qa/support/retrier.rb2
-rw-r--r--qa/qa/support/waiter.rb2
5 files changed, 10 insertions, 11 deletions
diff --git a/qa/qa/flow/login.rb b/qa/qa/flow/login.rb
index 5505fabd4ae..30137571dbd 100644
--- a/qa/qa/flow/login.rb
+++ b/qa/qa/flow/login.rb
@@ -12,6 +12,12 @@ module QA
yield
+ # Workaround for a bug preventing sign out from secondary nodes
+ # See https://gitlab.com/gitlab-org/gitlab/issues/198289
+ if address == :geo_secondary
+ Runtime::Browser.visit(:geo_primary, Page::Dashboard::Projects)
+ end
+
Page::Main::Menu.perform(&:sign_out)
end
diff --git a/qa/qa/page/base.rb b/qa/qa/page/base.rb
index f07d56e85c3..fc460f41a36 100644
--- a/qa/qa/page/base.rb
+++ b/qa/qa/page/base.rb
@@ -26,13 +26,13 @@ module QA
wait_for_requests
end
- def wait_until(max_duration: 60, sleep_interval: 0.1, reload: true, raise_on_failure: false)
+ def wait_until(max_duration: 60, sleep_interval: 0.1, reload: true, raise_on_failure: true)
Support::Waiter.wait_until(max_duration: max_duration, sleep_interval: sleep_interval, raise_on_failure: raise_on_failure) do
yield || (reload && refresh && false)
end
end
- def retry_until(max_attempts: 3, reload: false, sleep_interval: 0, raise_on_failure: false)
+ def retry_until(max_attempts: 3, reload: false, sleep_interval: 0, raise_on_failure: true)
Support::Retrier.retry_until(max_attempts: max_attempts, reload_page: (reload && self), sleep_interval: sleep_interval, raise_on_failure: raise_on_failure) do
yield
end
diff --git a/qa/qa/support/page/logging.rb b/qa/qa/support/page/logging.rb
index f59795e17c3..281e1b85cc3 100644
--- a/qa/qa/support/page/logging.rb
+++ b/qa/qa/support/page/logging.rb
@@ -16,13 +16,6 @@ module QA
super
end
- def wait_until(max_duration: 60, sleep_interval: 0.1, reload: true, raise_on_failure: false)
- log("next wait uses reload: #{reload}")
- # Logging of wait start/end/duration is handled by QA::Support::Waiter
-
- super
- end
-
def scroll_to(selector, text: nil)
msg = "scrolling to :#{selector}"
msg += " with text: #{text}" if text
diff --git a/qa/qa/support/retrier.rb b/qa/qa/support/retrier.rb
index 7b548e95453..f28534e7c11 100644
--- a/qa/qa/support/retrier.rb
+++ b/qa/qa/support/retrier.rb
@@ -34,7 +34,7 @@ module QA
result
end
- def retry_until(max_attempts: nil, max_duration: nil, reload_page: nil, sleep_interval: 0, raise_on_failure: false, retry_on_exception: false)
+ def retry_until(max_attempts: nil, max_duration: nil, reload_page: nil, sleep_interval: 0, raise_on_failure: true, retry_on_exception: false)
# For backwards-compatibility
max_attempts = 3 if max_attempts.nil? && max_duration.nil?
diff --git a/qa/qa/support/waiter.rb b/qa/qa/support/waiter.rb
index fe63c930c7c..18ccee80074 100644
--- a/qa/qa/support/waiter.rb
+++ b/qa/qa/support/waiter.rb
@@ -7,7 +7,7 @@ module QA
module_function
- def wait_until(max_duration: singleton_class::DEFAULT_MAX_WAIT_TIME, reload_page: nil, sleep_interval: 0.1, raise_on_failure: false, retry_on_exception: false)
+ def wait_until(max_duration: singleton_class::DEFAULT_MAX_WAIT_TIME, reload_page: nil, sleep_interval: 0.1, raise_on_failure: true, retry_on_exception: false)
QA::Runtime::Logger.debug(
<<~MSG.tr("\n", ' ')
with wait_until: max_duration: #{max_duration};