3021: Merge branch 'master' into 3021-workbench-perf
[arvados.git] / apps / workbench / test / integration / projects_test.rb
index 04f99c493aced7371efd53c9dafc0fc9cc2f0f5c..ce5b47e5d9bf5fef050972379c1124c6389f473d 100644 (file)
@@ -2,7 +2,7 @@ require 'integration_helper'
 
 class ProjectsTest < ActionDispatch::IntegrationTest
   setup do
-    Capybara.current_driver = Capybara.javascript_driver
+    need_javascript
   end
 
   test 'Check collection count for A Project in the tab pane titles' do
@@ -744,4 +744,16 @@ class ProjectsTest < ActionDispatch::IntegrationTest
     assert match, 'Expected project name not found'
     assert_text 'No description provided'
   end
+
+  test "first tab loads data when visiting other tab directly" do
+    # As of 2014-12-19, the first tab of project#show uses infinite scrolling.
+    # Make sure that it loads data even if we visit another tab directly.
+    need_selenium 'to land on specified tab using {url}#Advanced'
+    project = api_fixture("groups", "aproject")
+    visit(page_with_token("active_trustedclient",
+                          "/projects/#{project['uuid']}#Advanced"))
+    assert_text("API response")
+    find("#page-wrapper .nav-tabs :first-child a").click
+    assert_text("bytes Collection")
+  end
 end