Use regex to determine whether to print help text for arvbash.sh. refs #10655
[arvados.git] / apps / workbench / test / integration / smoke_test.rb
index 729345673e74c9939d2e78a3460454c4519980bf..a626e242843262643768afdfbbd3ca813c698d8c 100644 (file)
@@ -3,7 +3,7 @@ require 'uri'
 
 class SmokeTest < ActionDispatch::IntegrationTest
   setup do
-    Capybara.current_driver = Capybara.javascript_driver
+    need_javascript
   end
 
   def assert_visit_success(allowed=[200])
@@ -13,9 +13,12 @@ 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
+      elsif tag[:'data-remote']
+        # these don't necessarily work with format=html
+        nil
       else
         url = URI(tag[:href])
         url.host.nil? ? url.path : nil
@@ -26,7 +29,7 @@ class SmokeTest < ActionDispatch::IntegrationTest
   test "all first-level links succeed" do
     visit page_with_token('active_trustedclient', '/')
     assert_visit_success
-    click_link 'user-menu'
+    click_link 'notifications-menu'
     urls = [all_links_in('nav'),
             all_links_in('.navbar', /^Manage /)].flatten
     seen_urls = ['/']