1 require 'integration_helper'
2 require 'selenium-webdriver'
5 class PipelineInstancesTest < ActionDispatch::IntegrationTest
7 # Selecting collections requiresLocalStorage
8 headless = Headless.new
10 Capybara.current_driver = :selenium
13 test 'Create and run a pipeline' do
14 visit page_with_token('active_trustedclient')
16 visit '/pipeline_templates'
17 within('tr', text: 'Two Part Pipeline Template') do
18 find('a,button', text: 'Run').click
21 instance_page = current_path
23 # Go over to the collections page and select something
24 click_link 'Collections (data files)'
25 within('tr', text: 'GNU_General_Public_License') do
26 find('input[type=checkbox]').click
28 find('#persistent-selection-count').click
30 # Go back to the pipeline instance page to use the new selection
33 page.assert_selector 'a.disabled,button.disabled', text: 'Run'
34 assert find('p', text: 'Provide a value')
36 find('div.form-group', text: 'Foo/bar pair').
39 find('.editable-input select').click
40 find('.editable-input').
41 first(:option, 'b519d9cb706a29fc7ea24dbea2f05851+249025').click
44 # "Run" button is now enabled
45 page.assert_no_selector 'a.disabled,button.disabled', text: 'Run'
47 first('a,button', text: 'Run').click
49 # Pipeline is running. We have a "Stop" button instead now.
50 page.assert_selector 'a,button', text: 'Stop'
51 find('a,button', text: 'Stop').click
53 # Pipeline is stopped. We have the option to resume it.
54 page.assert_selector 'a,button', text: 'Run'
56 # Go over to the graph tab
58 assert page.has_css? 'div#provenance_graph'