Commit ccbceea7 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix end-to-end specs for rebasing a merge request

parent d685633a
...@@ -4,6 +4,7 @@ module QA ...@@ -4,6 +4,7 @@ module QA
class Show < Page::Base class Show < Page::Base
view 'app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_ready_to_merge.js' do view 'app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_ready_to_merge.js' do
element :merge_button element :merge_button
element :fast_forward_message, 'Fast-forward merge without a merge commit'
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
...@@ -12,19 +13,19 @@ module QA ...@@ -12,19 +13,19 @@ module QA
view 'app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_rebase.vue' do view 'app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_rebase.vue' do
element :mr_rebase_button element :mr_rebase_button
element :fast_forward_nessage, "Fast-forward merge is not possible" element :no_fast_forward_message, 'Fast-forward merge is not possible'
end end
def rebase! def rebase!
wait(reload: false) do click_element :mr_rebase_button
click_element :mr_rebase_button
has_text?("The source branch HEAD has recently changed.") wait(reload: false) do
has_text?('Fast-forward merge without a merge commit')
end end
end end
def fast_forward_possible? def fast_forward_possible?
!has_text?("Fast-forward merge is not possible") !has_text?('Fast-forward merge is not possible')
end end
def has_merge_button? def has_merge_button?
...@@ -34,10 +35,10 @@ module QA ...@@ -34,10 +35,10 @@ module QA
end end
def merge! def merge!
wait(reload: false) do click_element :merge_button
click_element :merge_button
has_text?("The changes were merged into") wait(reload: false) do
has_text?('The changes were merged into')
end end
end end
end end
......
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