Merge branch '5010-trash-button-for-collections'
[arvados.git] / apps / workbench / test / integration / pipeline_instances_test.rb
index b0dddc70308d8c6fdd15248d28661d5471e6c55f..9f4ce692e5c0b28c8661a5061af4d209140ec228 100644 (file)
@@ -299,7 +299,9 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
 
       # Now re-run the pipeline
       if with_options
-        find('a,button', text: 'Re-run options').click
+        assert_triggers_dom_event 'shown.bs.modal' do
+          find('a,button', text: 'Re-run options').click
+        end
         within('.modal-dialog') do
           page.assert_selector 'a,button', text: 'Copy and edit inputs'
           page.assert_selector 'a,button', text: 'Run now'
@@ -313,11 +315,6 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
         find('a,button', text: 'Re-run with latest').click
       end
 
-      # Wait for the dialog to close. (Otherwise, the next assertion
-      # could fail while we're still looking at the source instance
-      # page, even if the correct behavior is about to happen.)
-      assert_no_selector 'body.modal-open'
-
       # Verify that the newly created instance is created in the right
       # project. In case of project_viewer user, since the user cannot
       # write to the project, the pipeline should have been created in
@@ -327,7 +324,7 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
       if in_aproject && (user != 'project_viewer')
         assert_text 'A Project'
       else
-        assert_no_text? 'A Project'
+        assert_no_text 'A Project'
       end
     end
   end
@@ -446,8 +443,7 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
     ['admin', nil, 40, 200],
     ['admin', 'FUSE project', 1, 1],
     ['admin', 'pipeline_10', 2, 2],
-    ['active', 'containing at least two', 2, 100],  # component description
-    ['admin', 'containing at least two', 2, 100],
+    ['active', 'containing at least two', 2, 100],
     ['active', nil, 10, 100],
     ['active', 'no such match', 0, 0],
   ].each do |user, search_filter, expected_min, expected_max|