diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-20 00:08:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-20 00:08:17 +0300 |
commit | 3d6aa9071097f5070c801bee13a619da0a297d07 (patch) | |
tree | b455237758a12fefeec49c29cc8655cb63e118ff /qa | |
parent | abe6e7a2e7a456fa05f4ebeb28f8747a92cf59b1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/page/merge_request/show.rb | 14 | ||||
-rw-r--r-- | qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb | 18 |
2 files changed, 13 insertions, 19 deletions
diff --git a/qa/qa/page/merge_request/show.rb b/qa/qa/page/merge_request/show.rb index 8f5ac62d127..ba4e8d4f9fa 100644 --- a/qa/qa/page/merge_request/show.rb +++ b/qa/qa/page/merge_request/show.rb @@ -78,9 +78,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_content element :merge_moment_dropdown element :merge_immediately_menu_item + element :merged_status_content end view 'app/assets/javascripts/vue_merge_request_widget/components/states/sha_mismatch.vue' do @@ -192,10 +192,6 @@ module QA click_element(:edit_button) end - def fast_forward_possible? - has_element?(:fast_forward_message_content) - end - def fast_forward_not_possible? has_element?(:no_fast_forward_message_content) end @@ -265,7 +261,7 @@ module QA # To remove page refresh logic if possible # We don't raise on failure because this method is used as a predicate matcher retry_until(max_attempts: 3, reload: true, raise_on_failure: false) do - has_element?(:merged_status_content, text: 'The changes were merged into', wait: 20) + has_element?(:merged_status_content, text: /The changes were merged into|Changes merged into/, wait: 20) end end @@ -316,12 +312,6 @@ module QA end click_element(:mr_rebase_button) - - success = wait_until do - fast_forward_possible? - end - - raise "Rebase did not appear to be successful" unless success end def merge_immediately! diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb index 536abfa5303..ae1d3e6d383 100644 --- a/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb @@ -28,15 +28,19 @@ module QA merge_request.visit! - Page::MergeRequest::Show.perform do |merge_request| - expect(merge_request).to have_content('Merge blocked: the source branch must be rebased onto the target branch.') - expect(merge_request).to be_fast_forward_not_possible - expect(merge_request).not_to have_merge_button + Page::MergeRequest::Show.perform do |mr_page| + expect(mr_page).to have_content('Merge blocked: the source branch must be rebased onto the target branch.') + expect(mr_page).to be_fast_forward_not_possible + expect(mr_page).not_to have_merge_button + expect(merge_request.project.commits.size).to eq(2) - merge_request.rebase! + mr_page.rebase! - expect(merge_request).to have_merge_button - expect(merge_request).to be_fast_forward_possible + expect(mr_page).to have_merge_button + + mr_page.merge! + + expect(merge_request.project.commits.size).to eq(3) end end end |