Commit 0568efa2 authored by Ramya Authappan's avatar Ramya Authappan

Merge branch 'qa-shl-fix-transfer-project-inconsistent-ui-spec' into 'master'

Add retry to work around a seldom inconsistent UI issue

Closes #231242

See merge request gitlab-org/gitlab!39333
parents 35b58684 02c681c8
...@@ -44,6 +44,10 @@ module QA ...@@ -44,6 +44,10 @@ module QA
wait_for_requests wait_for_requests
end end
def click_body
page.find("body").click
end
def wait_until(max_duration: 60, sleep_interval: 0.1, reload: true, raise_on_failure: true) 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 Support::Waiter.wait_until(max_duration: max_duration, sleep_interval: sleep_interval, raise_on_failure: raise_on_failure) do
yield || (reload && refresh && false) yield || (reload && refresh && false)
......
...@@ -42,10 +42,16 @@ module QA ...@@ -42,10 +42,16 @@ module QA
end end
def transfer_project!(project_name, namespace) def transfer_project!(project_name, namespace)
expand_select_list # Retry added here due to seldom seen inconsistent UI state issue:
# Workaround for a failure to search when there are no spaces around the / # https://gitlab.com/gitlab-org/gitlab/-/issues/231242
# https://gitlab.com/gitlab-org/gitlab/-/issues/218965 retry_on_exception do
select_transfer_option(namespace.gsub(/([^\s])\/([^\s])/, '\1 / \2')) click_body
expand_select_list
# Workaround for a failure to search when there are no spaces around the /
# https://gitlab.com/gitlab-org/gitlab/-/issues/218965
select_transfer_option(namespace.gsub(/([^\s])\/([^\s])/, '\1 / \2'))
end
click_element(:transfer_button) click_element(:transfer_button)
fill_confirmation_text(project_name) fill_confirmation_text(project_name)
click_confirm_button click_confirm_button
......
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