X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/91dc5f1d7f5ad9eb2640f6089e2d0476cbf87c8e..e336e28f4ce9c13aad98d059d2befb505bff365b:/apps/workbench/test/integration/work_units_test.rb diff --git a/apps/workbench/test/integration/work_units_test.rb b/apps/workbench/test/integration/work_units_test.rb index b1d5a21589..5b5848ee77 100644 --- a/apps/workbench/test/integration/work_units_test.rb +++ b/apps/workbench/test/integration/work_units_test.rb @@ -109,8 +109,8 @@ class WorkUnitsTest < ActionDispatch::IntegrationTest end [ - ['Two Part Pipeline Template', 'part-one', 'Provide a value for the following'], - ['Workflow with input specifications', 'this workflow has inputs specified', 'Provide a value for the following'], + ['Pipeline with default input specifications', 'part-one', 'Provide values for the following'], + ['Workflow with default input specifications', 'this workflow has inputs specified', 'Provide a value for the following'], ].each do |template_name, preview_txt, process_txt| test "run a process using template #{template_name} from dashboard" do visit page_with_token('admin') @@ -118,7 +118,7 @@ class WorkUnitsTest < ActionDispatch::IntegrationTest within('.recent-processes-actions') do assert page.has_link?('All processes') - find('a', text: 'Run a pipeline').click + find('a', text: 'Run a process').click end # in the chooser, verify preview and click Next button @@ -131,6 +131,10 @@ class WorkUnitsTest < ActionDispatch::IntegrationTest # in the process page now assert_text process_txt assert_selector 'a', text: template_name + + assert_equal "Set value for ex_string_def", find('div.form-group > div > p.form-control-static > a', text: "hello-testing-123")[:"data-title"] + + page.assert_selector 'a.disabled,button.disabled', text: 'Run' end end @@ -207,4 +211,29 @@ class WorkUnitsTest < ActionDispatch::IntegrationTest assert_text(expect_log_text) end end + + [ + ['jobs', 'active', 'running_job_with_components', 'component1', '/jobs/zzzzz-8i9sb-jyq01m7in1jlofj#Log'], + ['pipeline_instances', 'active', 'pipeline_in_running_state', 'foo', '/jobs/zzzzz-8i9sb-pshmckwoma9plh7#Log'], + ['pipeline_instances', nil, 'pipeline_in_publicly_accessible_project_but_other_objects_elsewhere', 'foo', 'Log unavailable'], + ].each do |type, token, fixture, child, log_link| + test "link_to_log for #{fixture} for #{token}" do + obj = api_fixture(type)[fixture] + if token + visit page_with_token token, "/#{type}/#{obj['uuid']}" + else + Rails.configuration.anonymous_user_token = + api_fixture("api_client_authorizations", "anonymous", "api_token") + visit "/#{type}/#{obj['uuid']}" + end + + click_link(child) + + if token + assert_selector "a[href=\"#{log_link}\"]" + else + assert_text log_link + end + end + end end