1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 require 'diagnostics_test_helper'
7 class PipelineTest < DiagnosticsTest
8 pipelines_to_test = Rails.configuration.pipelines_to_test.andand.keys
11 need_selenium 'to make websockets work'
14 pipelines_to_test.andand.each do |pipeline_to_test|
15 test "run pipeline: #{pipeline_to_test}" do
16 visit_page_with_token 'active'
17 pipeline_config = Rails.configuration.pipelines_to_test[pipeline_to_test]
19 # Search for tutorial template
20 find '.navbar-fixed-top'
21 within('.navbar-fixed-top') do
22 page.find_field('search this site').set pipeline_config['template_uuid']
23 page.find('.glyphicon-search').click
27 assert_triggers_dom_event 'shown.bs.modal' do
28 find('a,button', text: 'Run').click
32 within('.modal-dialog') do
33 find('.selectable', text: 'Home').click
34 find('button', text: 'Choose').click
37 page.assert_selector('a.disabled,button.disabled', text: 'Run') if pipeline_config['input_paths'].any?
39 # Choose input for the pipeline
40 pipeline_config['input_paths'].each do |look_for|
45 # All needed input are filled in. Run this pipeline now
46 find('a,button', text: 'Components').click
47 find('a,button', text: 'Run').click
49 # Pipeline is running. We have a "Pause" button instead now.
50 page.assert_selector 'a,button', text: 'Pause'
52 # Wait for pipeline run to complete
53 wait_until_page_has 'completed', pipeline_config['max_wait_seconds']