X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/57d5e8e0f8e8c3871e2d95d14e3088c0a3f41a9b..ac36412ff05d99c6bd6cdc236d5cb8b538cfe0ed:/apps/workbench/test/integration/projects_test.rb diff --git a/apps/workbench/test/integration/projects_test.rb b/apps/workbench/test/integration/projects_test.rb index 2cc6a45f51..e5877aca6d 100644 --- a/apps/workbench/test/integration/projects_test.rb +++ b/apps/workbench/test/integration/projects_test.rb @@ -39,7 +39,10 @@ class ProjectsTest < ActionDispatch::IntegrationTest test 'Create a project and move it into a different project' do visit page_with_token 'active', '/projects' find("#projects-menu").click - find(".dropdown-menu a", text: "Home").click + within('.dropdown-menu') do + first('li', text: 'Home').click + end + wait_for_ajax find('.btn', text: "Add a subproject").click within('h2') do @@ -51,7 +54,10 @@ class ProjectsTest < ActionDispatch::IntegrationTest visit '/projects' find("#projects-menu").click - find(".dropdown-menu a", text: "Home").click + within('.dropdown-menu') do + first('li', text: 'Home').click + end + wait_for_ajax find('.btn', text: "Add a subproject").click within('h2') do find('.fa-pencil').click @@ -508,23 +514,23 @@ class ProjectsTest < ActionDispatch::IntegrationTest [ ['project_with_10_pipelines', 10, 0], - ['project_with_2_pipelines_and_60_jobs', 2, 60], + ['project_with_2_pipelines_and_60_crs', 2, 60], ['project_with_25_pipelines', 25, 0], - ].each do |project_name, num_pipelines, num_jobs| - test "scroll pipeline instances tab for #{project_name} with #{num_pipelines} pipelines and #{num_jobs} jobs" do - item_list_parameter = "Jobs_and_pipelines" + ].each do |project_name, num_pipelines, num_crs| + test "scroll pipeline instances tab for #{project_name} with #{num_pipelines} pipelines and #{num_crs} container requests" do + item_list_parameter = "Pipelines_and_processes" scroll_setup project_name, - num_pipelines + num_jobs, + num_pipelines + num_crs, item_list_parameter # check the general scrolling and the pipelines scroll_items_check num_pipelines, "pipeline_", item_list_parameter, 'tr[data-kind="arvados#pipelineInstance"]' - # Check job count separately - jobs_found = page.all('tr[data-kind="arvados#job"]') - found_job_count = jobs_found.count - assert_equal num_jobs, found_job_count, 'Did not find expected number of jobs' + # Check container request count separately + crs_found = page.all('tr[data-kind="arvados#containerRequest"]') + found_cr_count = crs_found.count + assert_equal num_crs, found_cr_count, 'Did not find expected number of container requests' end end @@ -612,8 +618,8 @@ class ProjectsTest < ActionDispatch::IntegrationTest assert_no_selector 'li.disabled', text: 'Copy selected' end - # Go to Jobs and pipelines tab and assert none selected - click_link 'Jobs and pipelines' + # Go to Pipelines and processes tab and assert none selected + click_link 'Pipelines and processes' wait_for_ajax # Since this is the first visit to this tab, all selection options should be disabled @@ -731,4 +737,27 @@ class ProjectsTest < ActionDispatch::IntegrationTest assert_no_selector 'li', text: 'Unrestricted public data' end 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'], + ].each do |template_name, preview_txt, process_txt| + test "run a process using template #{template_name} in a project" do + project = api_fixture('groups')['aproject'] + visit page_with_token 'active', '/projects/' + project['uuid'] + + find('.btn', text: 'Run a pipeline').click + + # in the chooser, verify preview and click Next button + within('.modal-dialog') do + find('.selectable', text: template_name).click + assert_text preview_txt + find('.btn', text: 'Next: choose inputs').click + end + + # in the process page now + assert_text process_txt + assert_text project['name'] + end + end end