1 require 'diagnostics_test_helper'
3 class PipelineTest < DiagnosticsTest
4 pipelines_to_test = Rails.configuration.pipelines_to_test.andand.keys
7 need_selenium 'to make websockets work'
10 pipelines_to_test.andand.each do |pipeline_to_test|
11 test "run pipeline: #{pipeline_to_test}" do
12 visit_page_with_token 'active'
13 pipeline_config = Rails.configuration.pipelines_to_test[pipeline_to_test]
15 # Search for tutorial template
16 find '.navbar-fixed-top'
17 within('.navbar-fixed-top') do
18 page.find_field('search').set pipeline_config['template_uuid']
19 page.find('.glyphicon-search').click
23 assert_triggers_dom_event 'shown.bs.modal' do
24 find('a,button', text: 'Run').click
28 within('.modal-dialog') do
29 find('.selectable', text: 'Home').click
30 find('button', text: 'Choose').click
33 page.assert_selector('a.disabled,button.disabled', text: 'Run') if pipeline_config['input_paths'].any?
35 # Choose input for the pipeline
36 pipeline_config['input_paths'].each do |look_for|
41 # All needed input are filled in. Run this pipeline now
42 find('a,button', text: 'Components').click
43 find('a,button', text: 'Run').click
45 # Pipeline is running. We have a "Pause" button instead now.
46 page.assert_selector 'a,button', text: 'Pause'
48 # Wait for pipeline run to complete
49 wait_until_page_has 'completed', pipeline_config['max_wait_seconds']