X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/04bce28b705a6ca33d2c9b19aa783f588a99c8e0..e6cd7c31ee28851d3ead992437fc93f2fc73ef92:/apps/workbench/test/integration/search_box_test.rb?ds=inline diff --git a/apps/workbench/test/integration/search_box_test.rb b/apps/workbench/test/integration/search_box_test.rb index 9a259e2703..14d28d2adc 100644 --- a/apps/workbench/test/integration/search_box_test.rb +++ b/apps/workbench/test/integration/search_box_test.rb @@ -1,28 +1,27 @@ require 'integration_helper' -require 'selenium-webdriver' -require 'headless' class SearchBoxTest < ActionDispatch::IntegrationTest setup do - headless = Headless.new - headless.start - Capybara.current_driver = :selenium + need_javascript end # test the search box def verify_search_box user if user && user['is_active'] - # let's search for a valid uuid + 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 user['uuid'] + page.find_field('search').set aproject_uuid page.find('.glyphicon-search').click end - # we should now be in the user's home project as a result of search - assert_selector "#Data_collections[data-object-uuid='#{user['uuid']}']", "Expected to be in user page after search click" + # we should now be in aproject as a result of search + assert_selector 'a', text:'Data collections' + click_link 'Data collections' + assert_selector "#Data_collections[data-object-uuid='#{aproject_uuid}']", "Expected to be in user page after search click" - # let's search again for an invalid valid uuid + # let's search again for an invalid uuid within('.navbar-fixed-top') do search_for = String.new user['uuid'] search_for[0]='1'