Commit 50b84fa6 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents 0f44e151 71c1db7a
4cc3e803023c9178a2112ac3f6bcd5b6b8660fd1
fbb56944d4581445d0cee29702dbe9531948ea04
......@@ -192,7 +192,7 @@ end
gem 'state_machines-activerecord', '~> 0.8.0'
# Issue tags
gem 'acts-as-taggable-on', '~> 6.0'
gem 'acts-as-taggable-on', '~> 7.0'
# Background jobs
gem 'sidekiq', '~> 5.2.7'
......
......@@ -63,8 +63,8 @@ GEM
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
acts-as-taggable-on (6.5.0)
activerecord (>= 5.0, < 6.1)
acts-as-taggable-on (7.0.0)
activerecord (>= 5.0, < 6.2)
adamantium (0.2.0)
ice_nine (~> 0.11.0)
memoizable (~> 0.4.0)
......@@ -1270,7 +1270,7 @@ DEPENDENCIES
RedCloth (~> 4.3.2)
acme-client (~> 2.0, >= 2.0.6)
activerecord-explain-analyze (~> 0.1)
acts-as-taggable-on (~> 6.0)
acts-as-taggable-on (~> 7.0)
addressable (~> 2.7)
akismet (~> 3.0)
apollo_upload_server (~> 2.0.2)
......
......@@ -188,19 +188,31 @@ module QA
end
def has_element?(name, **kwargs)
wait_for_requests(skip_finished_loading_check: !!kwargs.delete(:skip_finished_loading_check))
disabled = kwargs.delete(:disabled)
original_kwargs = kwargs.dup
wait = kwargs.delete(:wait) || Capybara.default_max_wait_time
text = kwargs.delete(:text)
klass = kwargs.delete(:class)
if disabled.nil?
wait = kwargs.delete(:wait) || Capybara.default_max_wait_time
text = kwargs.delete(:text)
klass = kwargs.delete(:class)
has_css?(element_selector_css(name, kwargs), text: text, wait: wait, class: klass)
else
find_element(name, kwargs).disabled? == disabled
try_find_element = ->(wait) do
if disabled.nil?
has_css?(element_selector_css(name, kwargs), text: text, wait: wait, class: klass)
else
find_element(name, original_kwargs).disabled? == disabled
end
end
# Check for the element before waiting for requests, just in case unrelated requests are in progress.
# This is to avoid waiting unnecessarily after the element we're interested in has already appeared.
return true if try_find_element.call(wait)
# If the element didn't appear, wait for requests and then check again
wait_for_requests(skip_finished_loading_check: !!kwargs.delete(:skip_finished_loading_check))
# We only wait one second now because we previously waited the full expected duration,
# plus however long it took for requests to complete. One second should be enough
# for the UI to update after requests complete.
try_find_element.call(1)
end
def has_no_element?(name, **kwargs)
......
......@@ -203,10 +203,13 @@ module TestEnv
end
gitaly_pid = Integer(File.read(TMP_TEST_PATH.join('gitaly.pid')))
gitaly2_pid = Integer(File.read(TMP_TEST_PATH.join('gitaly2.pid')))
praefect_pid = Integer(File.read(TMP_TEST_PATH.join('praefect.pid')))
Kernel.at_exit { stop(gitaly_pid) }
Kernel.at_exit { stop(praefect_pid) }
Kernel.at_exit do
pids = [gitaly_pid, gitaly2_pid, praefect_pid]
pids.each { |pid| stop(pid) }
end
wait('gitaly')
wait('praefect')
......
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