diff options
Diffstat (limited to 'qa/qa/page/merge_request/show.rb')
-rw-r--r-- | qa/qa/page/merge_request/show.rb | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/qa/qa/page/merge_request/show.rb b/qa/qa/page/merge_request/show.rb index afe88fc0cdc..1d8d9ed6859 100644 --- a/qa/qa/page/merge_request/show.rb +++ b/qa/qa/page/merge_request/show.rb @@ -136,14 +136,14 @@ module QA end def submit_pending_reviews + has_element?(:submit_review_button) within_element(:review_bar_content) do click_element(:review_preview_dropdown) click_element(:submit_review_button) - - # After clicking the button, wait for it to disappear - # before moving on to the next part of the test - has_no_element?(:submit_review_button) end + # After clicking the button, wait for it to disappear + # before moving on to the next part of the test + has_no_element?(:submit_review_button) end def add_comment_to_diff(text) @@ -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 |