Merge branch 'master' into 10645-cr-mounts-display
[arvados.git] / apps / workbench / test / integration / container_requests_test.rb
index df6584ebb6490cedac2fe439a1a77110a9feeb84..46f7e171fb21a7b6ebcb8402ec4b202775351bea 100644 (file)
@@ -96,4 +96,29 @@ class ContainerRequestsTest < ActionDispatch::IntegrationTest
     wait_for_ajax
     assert_text 'This container is queued'
   end
+
+  test "Run button enabled when workflow is empty and no inputs are needed" do
+    visit page_with_token("active")
+
+    find('.btn', text: 'Run a process').click
+    within('.modal-dialog') do
+      find('.selectable', text: 'Valid workflow with no definition yaml').click
+      find('.btn', text: 'Next: choose inputs').click
+    end
+
+    assert_text 'This workflow does not need any further inputs'
+    page.assert_selector 'a', text: 'Run'
+  end
+
+  test "Provenance graph shown on committed container requests" do
+    cr = api_fixture('container_requests', 'completed')
+    visit page_with_token("active", "/container_requests/#{cr['uuid']}")
+    assert page.has_text? 'Provenance'
+    click_link 'Provenance'
+    wait_for_ajax
+    # Check for provenance graph existance
+    page.assert_selector '#provenance_svg'
+    page.assert_selector 'ellipse+text', text: cr['name'], visible: false
+    page.assert_selector 'g.node>title', text: cr['uuid'], visible: false
+  end
 end