- if pipeline_config['input_names'].andand.any?
- # This pipeline needs input. So, Run should be disabled
- page.assert_selector 'a.disabled,button.disabled', text: 'Run'
-
- inputs = page.all('.btn', text: 'Choose')
- inputs.each_with_index do |input, index|
- # Choose input for the pipeline
- input.click
- within('.modal-dialog') do
- input_found = page.has_text?(pipeline_config['input_names'][index])
- if input_found
- find('.selectable', text: pipeline_config['input_names'][index]).click
- else
- fill_in('Search', with: pipeline_config['input_names'][index], exact: true)
- wait_for_ajax
- find('.selectable', text: pipeline_config['input_names'][index]).click
- end
- find('button', text: 'OK').click
- wait_for_ajax
- end
+ page.assert_selector('a.disabled,button.disabled', text: 'Run') if pipeline_config['input_paths'].any?