Commit f8cb92ac authored by Desiree Chevalier's avatar Desiree Chevalier

Add merge trains checkbox selector and update tests

parent 78ad646b
- return unless merge_trains_available? - return unless merge_trains_available?
.form-check .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 = form.label :merge_trains_enabled, class: 'form-check-label' do
= s_('ProjectSettings|Enable merge trains.') = s_('ProjectSettings|Enable merge trains.')
.text-secondary.mb-2 .text-secondary.mb-2
......
...@@ -17,6 +17,10 @@ module QA ...@@ -17,6 +17,10 @@ module QA
view 'ee/app/views/projects/_merge_pipelines_settings.html.haml' do view 'ee/app/views/projects/_merge_pipelines_settings.html.haml' do
element :merged_results_pipeline_checkbox element :merged_results_pipeline_checkbox
end end
view 'ee/app/views/projects/_merge_trains_settings.html.haml' do
element :merge_trains_checkbox
end
end end
end end
...@@ -24,8 +28,13 @@ module QA ...@@ -24,8 +28,13 @@ module QA
check_element :merged_results_pipeline_checkbox check_element :merged_results_pipeline_checkbox
end end
def click_merge_trains_checkbox
check_element :merge_trains_checkbox
end
def enable_merge_train def enable_merge_train
click_pipelines_for_merged_results_checkbox click_pipelines_for_merged_results_checkbox
click_merge_trains_checkbox
click_save_changes click_save_changes
end end
end end
......
...@@ -50,6 +50,7 @@ module QA ...@@ -50,6 +50,7 @@ module QA
Page::Project::Settings::Main.perform do |main| Page::Project::Settings::Main.perform do |main|
main.expand_merge_requests_settings do |settings| main.expand_merge_requests_settings do |settings|
settings.click_pipelines_for_merged_results_checkbox settings.click_pipelines_for_merged_results_checkbox
settings.click_merge_trains_checkbox
settings.click_save_changes settings.click_save_changes
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