X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/402461a12dbff7d0ec00c8446b925b021aabc2ed..e74ede4659428af77c50057d69a0d08e4e74a6ef:/apps/workbench/test/integration/smoke_test.rb diff --git a/apps/workbench/test/integration/smoke_test.rb b/apps/workbench/test/integration/smoke_test.rb index 700c8e6292..efaea00b01 100644 --- a/apps/workbench/test/integration/smoke_test.rb +++ b/apps/workbench/test/integration/smoke_test.rb @@ -2,6 +2,10 @@ require 'integration_helper' require 'uri' class SmokeTest < ActionDispatch::IntegrationTest + setup do + Capybara.current_driver = Capybara.javascript_driver + end + def assert_visit_success(allowed=[200]) assert_includes(allowed, status_code, "#{current_url} returned #{status_code}, not one of " + @@ -9,7 +13,7 @@ class SmokeTest < ActionDispatch::IntegrationTest end def all_links_in(find_spec, text_regexp=//) - find(find_spec).all('a').collect { |tag| + all(find_spec + ' a').collect { |tag| if tag[:href].nil? or tag[:href].empty? or (tag.text !~ text_regexp) nil else @@ -22,8 +26,8 @@ class SmokeTest < ActionDispatch::IntegrationTest test "all first-level links succeed" do visit page_with_token('active_trustedclient', '/') assert_visit_success - click_link 'user-menu' - urls = [all_links_in('.arvados-nav'), + click_link 'notifications-menu' + urls = [all_links_in('nav'), all_links_in('.navbar', /^Manage /)].flatten seen_urls = ['/'] while not (url = urls.shift).nil?