3112: removed rack_test driver and added selenium driver. still the test "trying...
[arvados.git] / apps / workbench / test / integration / logins_test.rb
index adc35d0cb0eff6f6bcc7d8d43507a421d97846e9..efa5a462149e40bff59793bcba19c558fb78596c 100644 (file)
@@ -1,6 +1,12 @@
 require 'integration_helper'
 
 class LoginsTest < ActionDispatch::IntegrationTest
+  setup do
+    headless = Headless.new
+    headless.start
+    Capybara.current_driver = :selenium
+  end
+
   test "login with api_token works after redirect" do
     visit page_with_token('active_trustedclient')
     assert page.has_text?('Recent jobs'), "Missing 'Recent jobs' from page"
@@ -8,8 +14,6 @@ class LoginsTest < ActionDispatch::IntegrationTest
   end
 
   test "trying to use expired token redirects to login page" do
-    Capybara.current_driver = :rack_test
-
     visit page_with_token('expired_trustedclient')
     buttons = all("a.btn", text: /Log in/)
     assert_equal(1, buttons.size, "Failed to find one login button")