X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/5605c33a0646b155c18482c8157be4d154382565..974f19045520ec3fc7286a0ee217c4697632feab:/apps/workbench/test/integration/pipeline_instances_test.rb diff --git a/apps/workbench/test/integration/pipeline_instances_test.rb b/apps/workbench/test/integration/pipeline_instances_test.rb index 7053d39bfd..d06604d260 100644 --- a/apps/workbench/test/integration/pipeline_instances_test.rb +++ b/apps/workbench/test/integration/pipeline_instances_test.rb @@ -40,13 +40,17 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest visit '/projects' find('.arv-project-list a,button', text: 'A Project').click find('.btn', text: 'Add data').click - find('span', text: 'foo_tag').click within('.modal-dialog') do + wait_for_ajax + first('span', text: 'foo_tag').click find('.btn', text: 'Add').click end + using_wait_time(Capybara.default_wait_time * 3) do + wait_for_ajax + end click_link 'Jobs and pipelines' - find('tr[data-kind="arvados#pipelineInstance"]', text: 'New pipeline instance'). + find('tr[data-kind="arvados#pipelineInstance"]', text: '(none)'). find('a', text: 'Show'). click @@ -57,10 +61,12 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest click within('.modal-dialog') do + assert(has_text?("Foo/bar pair"), + "pipeline input picker missing name of input") + wait_for_ajax first('span', text: 'foo_tag').click find('button', text: 'OK').click end - wait_for_ajax # "Run" button is now enabled @@ -102,8 +108,7 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest # create a pipeline instance find('.btn', text: 'Run a pipeline').click within('.modal-dialog') do - assert page.has_text? 'Two Part Pipeline Template' - find('.fa-gear').click + find('.selectable', text: 'Two Part Pipeline Template').click find('.btn', text: 'Next: choose inputs').click end @@ -114,10 +119,11 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest click within('.modal-dialog') do + assert_selector 'button.dropdown-toggle', text: 'A Project' + wait_for_ajax first('span', text: 'foo_tag').click find('button', text: 'OK').click end - wait_for_ajax # "Run" button present and enabled @@ -146,4 +152,14 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest assert page.has_text? 'script_version' end + test "JSON popup available for strange components" do + uuid = api_fixture("pipeline_instances")["components_is_jobspec"]["uuid"] + visit page_with_token("active", "/pipeline_instances/#{uuid}") + click_on "Components" + assert(page.has_no_text?("script_parameters"), + "components JSON visible without popup") + click_on "Show components JSON" + assert(page.has_text?("script_parameters"), + "components JSON not found") + end end