Skip to content
Snippets Groups Projects
Commit 2d77b075 authored by richard.chong's avatar richard.chong
Browse files

Removes page refreshes for MR#show

parent 7230fd40
No related merge requests found
......@@ -257,15 +257,7 @@ def merge_when_pipeline_succeeds!
end
def merged?
# Reloads the page at this point to avoid the problem of the merge status failing to update
# That's the transient UX issue this test is checking for, so if the MR is merged but the UI still shows the
# status as unmerged, the test will fail.
# Revisit after merge page re-architect is done https://gitlab.com/groups/gitlab-org/-/epics/5598
# To remove page refresh logic if possible
# We don't raise on failure because this method is used as a predicate matcher
retry_until(max_attempts: 3, reload: true, raise_on_failure: false) do
has_element?(:merged_status_content, text: /The changes were merged into|Changes merged into/, wait: 20)
end
has_element?(:merged_status_content, text: /The changes were merged into|Changes merged into/, wait: 20)
end
# Check if the MR is able to be merged
......@@ -327,10 +319,7 @@ def merge_immediately!
end
def try_to_merge!
# Revisit after merge page re-architect is done https://gitlab.com/gitlab-org/gitlab/-/issues/300042
# To remove page refresh logic if possible
wait_until_ready_to_merge
wait_until { !find_element(:merge_button).has_text?("when pipeline succeeds") }
click_element(:merge_button)
end
......
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