Merge branch 'master' into 3088-project-chooser-on-run-pipeline-template
[arvados.git] / apps / workbench / test / integration / pipeline_instances_test.rb
index a85fd996fc50185e6ece4d57c4061975b1462f25..5071fb47666bee5fe73813a3e50cc93d9b3580a2 100644 (file)
@@ -18,18 +18,17 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
       find('a,button', text: 'Run').click
     end
 
+    # project chooser
+    within('.modal-dialog') do
+      find('.selectable', text: 'A Project').click
+      find('button', text: 'Choose').click
+    end
+
     # This pipeline needs input. So, Run should be disabled
     page.assert_selector 'a.disabled,button.disabled', text: 'Run'
 
     instance_page = current_path
 
-    # put this pipeline instance in "A Project"
-    find('button', text: 'Choose a project...').click
-    within('.modal-dialog') do
-      find('.selectable', text: 'A Project').click
-      find('button', text: 'Move').click
-    end
-
     # Go over to the collections page and select something
     visit '/collections'
     within('tr', text: 'GNU_General_Public_License') do
@@ -45,7 +44,7 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
     within('.modal-dialog') do
       find('.btn', text: 'Add').click
     end
-   
+
     find('tr[data-kind="arvados#pipelineInstance"]', text: 'New pipeline instance').
       find('a', text: 'Show').
       click
@@ -57,7 +56,7 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
       click
 
     within('.modal-dialog') do
-      find('span', text: 'foo_tag').click
+      first('span', text: 'foo_tag').click
       find('button', text: 'OK').click
     end
 
@@ -114,7 +113,7 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
       click
 
     within('.modal-dialog') do
-      find('span', text: 'foo_tag').click
+      first('span', text: 'foo_tag').click
       find('button', text: 'OK').click
     end