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 {
data-toggle="dropdown"
aria-label="Select merge moment">
<i
class="fa fa-chevron-down"
class="fa fa-chevron-down qa-merge-moment-dropdown"
aria-hidden="true"
></i>
</button>
......@@ -265,7 +265,7 @@ export default {
role="menu">
<li>
<a
class="merge_when_pipeline_succeeds"
class="merge_when_pipeline_succeeds qa-merge-when-pipeline-succeeds-option"
href="#"
@click.prevent="handleMergeButtonClick(true)">
<span class="media">
......@@ -279,7 +279,7 @@ export default {
</li>
<li>
<a
class="accept-merge-request"
class="accept-merge-request qa-merge-immediately-option"
href="#"
@click.prevent="handleMergeButtonClick(false, true)">
<span class="media">
......
......@@ -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')
......
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