Commit a61719f3 authored by Mark Lapierre's avatar Mark Lapierre

Merge branch 'qa-add-merge-trains-checkbox' into 'master'

Add merge trains checkbox selector and update tests

See merge request gitlab-org/gitlab!47971
parents 70f60130 f8cb92ac
- return unless merge_trains_available?
.form-check
= form.check_box :merge_trains_enabled, class: 'form-check-input'
= form.check_box :merge_trains_enabled, class: 'form-check-input', data: { qa_selector: 'merge_trains_checkbox' }
= form.label :merge_trains_enabled, class: 'form-check-label' do
= s_('ProjectSettings|Enable merge trains.')
.text-secondary.mb-2
......
......@@ -17,6 +17,10 @@ module QA
view 'ee/app/views/projects/_merge_pipelines_settings.html.haml' do
element :merged_results_pipeline_checkbox
end
view 'ee/app/views/projects/_merge_trains_settings.html.haml' do
element :merge_trains_checkbox
end
end
end
......@@ -24,8 +28,13 @@ module QA
check_element :merged_results_pipeline_checkbox
end
def click_merge_trains_checkbox
check_element :merge_trains_checkbox
end
def enable_merge_train
click_pipelines_for_merged_results_checkbox
click_merge_trains_checkbox
click_save_changes
end
end
......
......@@ -50,6 +50,7 @@ module QA
Page::Project::Settings::Main.perform do |main|
main.expand_merge_requests_settings do |settings|
settings.click_pipelines_for_merged_results_checkbox
settings.click_merge_trains_checkbox
settings.click_save_changes
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