X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/31d76600cdb691251d0823cc6be601d958b4e1a4..0f644e242ef37c911ad3dc25aca8135c339de349:/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 91b382d1bd..ed214d62cc 100644 --- a/apps/workbench/test/integration/work_units_test.rb +++ b/apps/workbench/test/integration/work_units_test.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + require 'helpers/fake_websocket_helper' require 'integration_helper' @@ -254,4 +258,45 @@ class WorkUnitsTest < ActionDispatch::IntegrationTest end end end + + test 'Run from workflows index page' do + visit page_with_token('active', '/workflows') + + wf_count = page.all('a[data-original-title="show workflow"]').count + assert_equal true, wf_count>0 + + # Run one of the workflows + wf_name = 'Workflow with input specifications' + within('tr', text: wf_name) do + find('a,button', text: 'Run').click + end + + # Choose project for the container_request being created + within('.modal-dialog') do + find('.selectable', text: 'A Project').click + find('button', text: 'Choose').click + end + + # In newly created container_request page now + assert_text 'A Project' # CR created in "A Project" + assert_text "This container request was created from the workflow #{wf_name}" + assert_match /Provide a value for .* then click the \"Run\" button to start the workflow/, page.text + end + + test 'Run workflow from show page' do + visit page_with_token('active', '/workflows/zzzzz-7fd4e-validwithinputs') + + find('a,button', text: 'Run this workflow').click + + # Choose project for the container_request being created + within('.modal-dialog') do + find('.selectable', text: 'A Project').click + find('button', text: 'Choose').click + end + + # In newly created container_request page now + assert_text 'A Project' # CR created in "A Project" + assert_text "This container request was created from the workflow" + assert_match /Provide a value for .* then click the \"Run\" button to start the workflow/, page.text + end end