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 find('button', text: 'Choose a folder...').click
24 within('.modal-dialog') do
25 find('.selectable', text: 'A Folder').click
26 find('button', text: 'Move').click
29 # Go over to the collections page and select something
31 within('tr', text: 'GNU_General_Public_License') do
32 find('input[type=checkbox]').click
34 find('#persistent-selection-count').click
36 # Add this collection to the folder
38 find('.arv-folder-list a,button', text: 'A Folder').click
39 find('.btn', text: 'Add data').click
40 find('span', text: 'foo_tag').click
41 within('.modal-dialog') do
42 find('.btn', text: 'Add').click
45 find('tr[data-kind="arvados#pipelineInstance"]', text: 'New pipeline instance').
46 find('a', text: 'Show').
49 assert find('p', text: 'Provide a value')
51 find('div.form-group', text: 'Foo/bar pair').
52 find('.btn', text: 'Choose').
55 within('.modal-dialog') do
56 find('span', text: 'foo_tag').click
57 find('button', text: 'OK').click
62 # "Run" button is now enabled
63 page.assert_no_selector 'a.disabled,button.disabled', text: 'Run'
65 first('a,button', text: 'Run').click
67 # Pipeline is running. We have a "Stop" button instead now.
68 page.assert_selector 'a,button', text: 'Stop'
69 find('a,button', text: 'Stop').click
71 # Pipeline is stopped. It should now be in paused state.
72 assert page.has_text? 'Paused'
73 page.assert_selector 'a,button', text: 'Clone and edit'
75 # Go over to the graph tab
76 # click_link 'Advanced'
78 # assert page.has_css? 'div#provenance_graph'