11465: add tooltips to disabled collection file controls
[arvados.git] / apps / workbench / test / integration / collections_test.rb
index 203d08d500cb390c2a97fe400ae941561490248f..8b43e5dbe32ba9d9c58d31a5ba2f2e24b0729fde 100644 (file)
@@ -379,8 +379,10 @@ class CollectionsTest < ActionDispatch::IntegrationTest
     assert_selector 'a[data-toggle="disabled"]', text: 'Upload'
 
     within('.collection_files') do
-      assert_equal true, page.all('.btn-collection-file-rename')[0]['class'].include?('disabled')
-      assert_equal true, page.all('.btn-collection-file-remove')[0]['class'].include?('disabled')
+      file_ctrls = page.all('.btn-collection-file-control')
+      assert_equal 2, file_ctrls.size
+      assert_equal true, file_ctrls[0]['class'].include?('disabled')
+      assert_equal true, file_ctrls[1]['class'].include?('disabled')
       find('input[type=checkbox]').click
     end
 
@@ -396,8 +398,10 @@ class CollectionsTest < ActionDispatch::IntegrationTest
     assert_selector 'a', text: 'Upload'
 
     within('.collection_files') do
-      assert_equal false, page.all('.btn-collection-file-rename')[0]['class'].include?('disabled')
-      assert_equal false, page.all('.btn-collection-file-remove')[0]['class'].include?('disabled')
+      file_ctrls = page.all('.btn-collection-file-control')
+      assert_equal 2, file_ctrls.size
+      assert_equal false, file_ctrls[0]['class'].include?('disabled')
+      assert_equal false, file_ctrls[1]['class'].include?('disabled')
 
       # previous checkbox selection won't result in firing a new event;
       # undo and redo checkbox to fire the selection event again