Merge branch 'master' into 10645-cr-mounts-display
[arvados.git] / apps / workbench / test / integration / work_units_test.rb
index 91b382d1bd0402e25488ec80e08e9c61ea1c745d..f9f5addb1561849b34f0f80ae659417468dc797e 100644 (file)
@@ -254,4 +254,28 @@ 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
 end