# Configure test user tokens as "diagnostics_testing_user_tokens".
# At this time the tests need an "active" user token.
# Also, configure the pipelines to be executed as "diagnostics_testing_pipeline_fields".
- # For each of the pipeline fields:
- # You
+ # For each of the pipelines identified by the name of your choice
+ # ("tutorial pipeline" and "tutorial pipeline 2" in this sample):
+ # template_uuid: is the uuid of the template to be executed
+ # input_paths: an array of inputs for the pipeline. Use either a collection's "uuid"
+ # or a file's "uuid/file_name" path in this array. If the pipeline does not require
+ # any inputs, this can be omitted.
#diagnostics_testing_user_tokens:
# active: eu33jurqntstmwo05h1jr3eblmi961e802703y6657s8zb14r
- # admin: eu33jurqntstmwo05h1jr3eblmi961e802703y6657s8zb14r
#diagnostics_testing_pipeline_fields:
# tutorial pipeline:
# template_uuid: zzzzz-p5p6p-rxj8d71854j9idn
- # input_names: ['Diagnostic testing - Tutorial pipeline input']
+ # input_paths: [zzzzz-4zz18-u9pmni8msw9zm9n]
# tutorial pipeline 2:
# template_uuid: zzzzz-p5p6p-kfwus81of6y3ezs
- # input_names: ['Diagnostic testing - Tutorial pipeline input']
+ # input_paths: [zzzzz-4zz18-u9pmni8msw9zm9n]
find('button', text: 'Choose').click
end
- if pipeline_config['input_names'].andand.any?
+ # Choose input for the pipeline
+ if pipeline_config['input_paths'].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
+ inputs_needed = page.all('.btn', text: 'Choose')
+ inputs_needed.each_with_index do |input_needed, index|
+ input_needed.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
+ look_for = pipeline_config['input_paths'][index]
+ found = page.has_text?(look_for)
+ if found
+ find('.selectable').click
else
- fill_in('Search', with: pipeline_config['input_names'][index], exact: true)
+ fill_in('Search', with: look_for, exact: true)
wait_for_ajax
- find('.selectable', text: pipeline_config['input_names'][index]).click
+ find('.selectable').click
end
find('button', text: 'OK').click
wait_for_ajax
end
-
- # Run this pipeline instance
- find('a,button', text: 'Run').click
- # Pipeline is running. We have a "Stop" button instead now.
- page.assert_selector 'a,button', text: 'Stop'
end
end
+
+ # Run this pipeline instance
+ find('a,button', text: 'Run').click
+
+ # Pipeline is running. We have a "Stop" button instead now.
+ page.assert_selector 'a,button', text: 'Stop'
end
end