Merge branch '20850-wb1-deprecated' refs #20850
[arvados.git] / apps / workbench / test / integration / search_box_test.rb
index 9bb3f73d384d922b5b2e91c23a38e852e3c2ca01..51d615fe2d3383007bee3f7c7c0b441ef36c5e65 100644 (file)
@@ -15,8 +15,8 @@ class SearchBoxTest < ActionDispatch::IntegrationTest
       aproject_uuid = api_fixture('groups')['aproject']['uuid']
       # let's search for aproject by uuid
       within('.navbar-fixed-top') do
-        page.has_field?('search')
-        page.find_field('search').set aproject_uuid
+        page.has_field?('search this site')
+        page.find_field('search this site').set aproject_uuid
         page.find('.glyphicon-search').click
       end
 
@@ -29,7 +29,7 @@ class SearchBoxTest < ActionDispatch::IntegrationTest
       within('.navbar-fixed-top') do
         search_for = String.new user['uuid']
         search_for[0]='1'
-        page.find_field('search').set search_for
+        page.find_field('search this site').set search_for
         page.find('.glyphicon-search').click
       end
 
@@ -65,7 +65,7 @@ class SearchBoxTest < ActionDispatch::IntegrationTest
 
       within('.navbar-fixed-top') do
         # search again for the anonymously accessible project
-        page.find_field('search').set publicly_accessible_project['name'][0,10]
+        page.find_field('search this site').set publicly_accessible_project['name'][0,10]
         page.find('.glyphicon-search').click
       end
 
@@ -74,7 +74,7 @@ class SearchBoxTest < ActionDispatch::IntegrationTest
         assert page.has_text?('Search'), 'No text - Search'
         assert page.has_text?('Cancel'), 'No text - Cancel'
         assert_selector('div', text: publicly_accessible_project['name'])
-        find(:xpath, '//div[./span[contains(.,publicly_accessible_project["uuid"])]]').click
+        find("div[data-object-uuid=#{publicly_accessible_project["uuid"]}]").click
 
         click_button 'Show'
       end
@@ -84,7 +84,7 @@ class SearchBoxTest < ActionDispatch::IntegrationTest
       assert page.has_text?(publicly_accessible_project['description']), 'No text - publicly accessible project description'
     else
       within('.navbar-fixed-top') do
-        page.has_no_field?('search')
+        page.has_no_field?('search this site')
       end
     end
   end