Commit e7b7de4c authored by Will Meek's avatar Will Meek

Enable SAST spec performance improvement

Improve the performance of the
Enable SAST end to end spec by
merging the test MR immediately
rather than waiting on the MR
pipeline to succeed
parent 6a8de81a
......@@ -287,6 +287,17 @@ module QA
raise "Rebase did not appear to be successful" unless success
end
def merge_immediately!
merge_moment_dropdown_found = has_element?(:merge_moment_dropdown, wait: 0)
if merge_moment_dropdown_found
click_element(:merge_moment_dropdown)
click_element(:merge_immediately_menu_item)
else
click_element(:merge_button)
end
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
......
......@@ -120,7 +120,7 @@ module QA
end
Page::MergeRequest::Show.perform do |merge_request|
merge_request.try_to_merge!
merge_request.merge_immediately!
end
Flow::Pipeline.visit_latest_pipeline
......
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