Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-01-06 15:10:34 +00:00
parent f2c27c6f97
commit 04a42f5e03
6 changed files with 42 additions and 18 deletions

View file

@ -77,6 +77,15 @@ Please list the test areas (unit, integration and end-to-end) that needs to be a
See the test engineering planning process and reach out to your counterpart Software Engineer in Test for assistance: https://about.gitlab.com/handbook/engineering/quality/test-engineering/#test-planning -->
### Available Tier
<!-- This section should be used for setting the appropriate tier that this feature will belong to. Pricing can be found here: https://about.gitlab.com/pricing/
* Free
* Premium/Silver
* Ultimate/Gold
-->
### What does success look like, and how can we measure that?
<!--

View file

@ -1 +1 @@
4cc3e803023c9178a2112ac3f6bcd5b6b8660fd1
fbb56944d4581445d0cee29702dbe9531948ea04

View file

@ -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'

View file

@ -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)

View file

@ -188,19 +188,31 @@ module QA
end
def has_element?(name, **kwargs)
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)
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))
disabled = kwargs.delete(:disabled)
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
end
# 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)

View file

@ -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')