Commit b9dde18a authored by Mark Lapierre's avatar Mark Lapierre Committed by Robert Speicher

QA: Fix failure in merge_merge_request_from_fork_spec.rb

parent 89985b9f
...@@ -255,7 +255,7 @@ export default { ...@@ -255,7 +255,7 @@ export default {
data-toggle="dropdown" data-toggle="dropdown"
aria-label="Select merge moment"> aria-label="Select merge moment">
<i <i
class="fa fa-chevron-down" class="fa fa-chevron-down qa-merge-moment-dropdown"
aria-hidden="true" aria-hidden="true"
></i> ></i>
</button> </button>
...@@ -265,7 +265,7 @@ export default { ...@@ -265,7 +265,7 @@ export default {
role="menu"> role="menu">
<li> <li>
<a <a
class="merge_when_pipeline_succeeds" class="merge_when_pipeline_succeeds qa-merge-when-pipeline-succeeds-option"
href="#" href="#"
@click.prevent="handleMergeButtonClick(true)"> @click.prevent="handleMergeButtonClick(true)">
<span class="media"> <span class="media">
...@@ -279,7 +279,7 @@ export default { ...@@ -279,7 +279,7 @@ export default {
</li> </li>
<li> <li>
<a <a
class="accept-merge-request" class="accept-merge-request qa-merge-immediately-option"
href="#" href="#"
@click.prevent="handleMergeButtonClick(false, true)"> @click.prevent="handleMergeButtonClick(false, true)">
<span class="media"> <span class="media">
......
...@@ -5,6 +5,9 @@ module QA ...@@ -5,6 +5,9 @@ module QA
view 'app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue' do view 'app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue' do
element :merge_button element :merge_button
element :fast_forward_message, 'Fast-forward merge without a merge commit' 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 end
view 'app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue' do view 'app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue' do
...@@ -27,7 +30,20 @@ module QA ...@@ -27,7 +30,20 @@ module QA
def has_merge_button? def has_merge_button?
refresh 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 end
def rebase! def rebase!
...@@ -59,7 +75,7 @@ module QA ...@@ -59,7 +75,7 @@ module QA
!first(element_selector_css(:merge_button)).disabled? !first(element_selector_css(:merge_button)).disabled?
end end
click_element :merge_button merge_immediately
wait(reload: false) do wait(reload: false) do
has_text?('The changes were merged into') has_text?('The changes were merged into')
......
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