Commit be125103 authored by Ramya Authappan's avatar Ramya Authappan

Merge branch 'ml-qa-disable-autodevops-default-simplify-merging' into 'master'

Disable autodevops by default and simplify merging

Closes #36824

See merge request gitlab-org/gitlab!21613
parents f74b1569 c5f0148b
......@@ -60,6 +60,15 @@ module QA
element :edit_button
end
def add_comment_to_diff(text)
wait(interval: 5) do
has_text?("No newline at end of file")
end
all_elements(:new_diff_line).first.hover
click_element :diff_comment
fill_element :reply_input, text
end
def click_discussions_tab
click_element :notes_tab
end
......@@ -72,6 +81,10 @@ module QA
click_element :pipeline_link
end
def edit!
click_element :edit_button
end
def fast_forward_possible?
has_no_text?('Fast-forward merge is not possible')
end
......@@ -82,55 +95,6 @@ module QA
has_element?(:merge_button)
end
def has_merge_options?
has_element?(:merge_moment_dropdown)
end
def merged?
has_element? :merged_status_content, text: 'The changes were merged into'
end
def merge_immediately
wait(reload: false) do
finished_loading?
end
if has_merge_options?
retry_until do
click_element :merge_moment_dropdown
has_element? :merge_immediately_option
end
click_element :merge_immediately_option
else
click_element :merge_button
end
wait(reload: false) do
merged?
end
end
def rebase!
# The rebase button is disabled on load
wait do
has_element?(:mr_rebase_button)
end
# The rebase button is enabled via JS
wait(reload: false) do
!find_element(:mr_rebase_button).disabled?
end
click_element :mr_rebase_button
success = wait do
has_text?('Fast-forward merge without a merge commit')
end
raise "Rebase did not appear to be successful" unless success
end
def has_assignee?(username)
page.within(element_selector_css(:assignee_block)) do
has_text?(username)
......@@ -156,20 +120,6 @@ module QA
has_element?(:description, text: description)
end
def try_to_merge!
merge_immediately if ready_to_merge?
end
def merge!
try_to_merge!
success = wait do
has_text?('The changes were merged into')
end
raise "Merge did not appear to be successful" unless success
end
def mark_to_squash
# The squash checkbox is disabled on load
wait do
......@@ -184,17 +134,14 @@ module QA
click_element :squash_checkbox
end
def add_comment_to_diff(text)
wait(interval: 5) do
has_text?("No newline at end of file")
end
all_elements(:new_diff_line).first.hover
click_element :diff_comment
fill_element :reply_input, text
def merge!
click_element :merge_button if ready_to_merge?
raise "Merge did not appear to be successful" unless merged?
end
def edit!
click_element :edit_button
def merged?
has_element?(:merged_status_content, text: 'The changes were merged into', wait: 30)
end
def ready_to_merge?
......@@ -209,6 +156,30 @@ module QA
end
end
def rebase!
# The rebase button is disabled on load
wait do
has_element?(:mr_rebase_button)
end
# The rebase button is enabled via JS
wait(reload: false) do
!find_element(:mr_rebase_button).disabled?
end
click_element :mr_rebase_button
success = wait do
has_text?('Fast-forward merge without a merge commit')
end
raise "Rebase did not appear to be successful" unless success
end
def try_to_merge!
click_element :merge_button if ready_to_merge?
end
def view_email_patches
click_element :dropdown_toggle
visit_link_in_element(:download_email_patches)
......
......@@ -48,7 +48,7 @@ module QA
@standalone = false
@description = 'My awesome project'
@initialize_with_readme = false
@auto_devops_enabled = true
@auto_devops_enabled = false
@visibility = 'public'
end
......
......@@ -35,7 +35,7 @@ module QA
Page::Project::Issue::Show.perform(&:click_close_issue_button)
mr.visit!
Page::MergeRequest::Show.perform(&:merge_immediately)
Page::MergeRequest::Show.perform(&:merge!)
group.visit!
Page::Group::Menu.perform(&:click_group_analytics_item)
......
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