summaryrefslogtreecommitdiff
path: root/qa/qa/page/merge_request/show.rb
diff options
context:
space:
mode:
authorMark Lapierre <mlapierre@gitlab.com>2018-09-20 15:48:38 +0000
committerRobert Speicher <robert@gitlab.com>2018-09-20 15:48:38 +0000
commitb9dde18a9fd56393333e3791b55126449957ea22 (patch)
tree2f50798a74fc7056b899ed327c4d85e1df9e33a9 /qa/qa/page/merge_request/show.rb
parent89985b9f119afe18a13ad1d0e35fa5505e3406e6 (diff)
downloadgitlab-ce-b9dde18a9fd56393333e3791b55126449957ea22.tar.gz
QA: Fix failure in merge_merge_request_from_fork_spec.rb
Diffstat (limited to 'qa/qa/page/merge_request/show.rb')
-rw-r--r--qa/qa/page/merge_request/show.rb20
1 files changed, 18 insertions, 2 deletions
diff --git a/qa/qa/page/merge_request/show.rb b/qa/qa/page/merge_request/show.rb
index c200f14f4fb..befb7c1809a 100644
--- a/qa/qa/page/merge_request/show.rb
+++ b/qa/qa/page/merge_request/show.rb
@@ -5,6 +5,9 @@ module QA
view 'app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue' do
element :merge_button
element :fast_forward_message, 'Fast-forward merge without a merge commit'
+ element :merge_moment_dropdown
+ element :merge_when_pipeline_succeeds_option
+ element :merge_immediately_option
end
view 'app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue' do
@@ -27,7 +30,20 @@ module QA
def has_merge_button?
refresh
- has_selector?('.accept-merge-request')
+ has_css?(element_selector_css(:merge_button))
+ end
+
+ def has_merge_options?
+ has_css?(element_selector_css(:merge_moment_dropdown))
+ end
+
+ def merge_immediately
+ if has_merge_options?
+ click_element :merge_moment_dropdown
+ click_element :merge_immediately_option
+ else
+ click_element :merge_button
+ end
end
def rebase!
@@ -59,7 +75,7 @@ module QA
!first(element_selector_css(:merge_button)).disabled?
end
- click_element :merge_button
+ merge_immediately
wait(reload: false) do
has_text?('The changes were merged into')