Merge branch '15014-wrong-node-count'
authorTom Clegg <tclegg@veritasgenetics.com>
Thu, 3 Oct 2019 15:44:22 +0000 (11:44 -0400)
committerTom Clegg <tclegg@veritasgenetics.com>
Thu, 3 Oct 2019 15:44:22 +0000 (11:44 -0400)
fixes #15014

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg@veritasgenetics.com>

apps/workbench/app/views/projects/_show_dashboard.html.erb
apps/workbench/test/controllers/projects_controller_test.rb
apps/workbench/test/integration/application_layout_test.rb
apps/workbench/test/integration/logins_test.rb
apps/workbench/test/integration/user_profile_test.rb
apps/workbench/test/integration/work_units_test.rb

index 71ef2454190d7625cae12cf77d44f05a1ad7ed27..6c58cd30fc723f7a662b2b6b6728cb719519136b 100644 (file)
@@ -36,7 +36,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
 
 <%
   recent_procs_panel_width = 6
-  if !PipelineInstance.api_exists?(:index)
+  if !PipelineInstance.api_exists?(:create)
     recent_procs_title = 'Recent processes'
     run_proc_title = 'Choose a workflow to run:'
     show_node_status = false
index 0f79168901364f72c232c85cd981eb0540efd084..dd828952be2fb828e8f1e1b11b1cfc1616515683 100644 (file)
@@ -396,10 +396,7 @@ EOT
     end
   end
 
-  [
-    [:admin, true],
-    [:active, false],
-  ].each do |user, expect_all_nodes|
+  [:admin, :active].each do |user|
     test "in dashboard other index page links as #{user}" do
       get :index, params: {}, session: session_for(user)
 
@@ -409,14 +406,6 @@ EOT
         assert_includes @response.body, "href=\"#{path}\""
         assert_includes @response.body, "All #{target}"
       end
-
-      if expect_all_nodes
-        assert_includes @response.body, "href=\"/nodes\""
-        assert_includes @response.body, "All nodes"
-      else
-        assert_not_includes @response.body, "href=\"/nodes\""
-        assert_not_includes @response.body, "All nodes"
-      end
     end
   end
 
index dc958d3b5e23295bd2013de9c0a4af9db419b0d0..e28809e1318ba42c572d9f1a3eca94387d9a39b2 100644 (file)
@@ -214,7 +214,7 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
 
         first('button', text: 'x').click
       end
-      assert_text 'Recent pipelines and processes' # seeing dashboard now
+      assert_text 'Recent processes' # seeing dashboard now
     end
   end
 
@@ -285,7 +285,7 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
     test "visit dashboard as #{token}" do
       visit page_with_token(token)
 
-      assert_text 'Recent pipelines and processes' # seeing dashboard now
+      assert_text 'Recent processes' # seeing dashboard now
       within('.recent-processes-actions') do
         assert page.has_link?('Run a process')
         assert page.has_link?('All processes')
@@ -307,19 +307,6 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
           assert page.has_link? 'foo_file'
         end
       end
-
-      within('.compute-node-actions') do
-        if is_admin
-          assert page.has_link?('All nodes')
-        else
-          assert page.has_no_link?('All nodes')
-        end
-      end
-
-      within('.compute-node-summary-pane') do
-        click_link 'Details'
-        assert_text 'compute0'
-      end
     end
   end
 end
index 7f2774ce2f33beb7d596a32dc89569c984ff17f2..f079fbb8f1ce39eb4d88e33f232c3f8796dce89c 100644 (file)
@@ -11,7 +11,7 @@ class LoginsTest < ActionDispatch::IntegrationTest
 
   test "login with api_token works after redirect" do
     visit page_with_token('active_trustedclient')
-    assert page.has_text?('Recent pipelines and processes'), "Missing 'Recent pipelines and processes' from page"
+    assert page.has_text?('Recent processes'), "Missing 'Recent processes' from page"
     assert_no_match(/\bapi_token=/, current_path)
   end
 
index 547ef06a6827f013b0e958226e10d87ef57464fe..30d4943c62018473822877b475023544f73ac503 100644 (file)
@@ -24,7 +24,7 @@ class UserProfileTest < ActionDispatch::IntegrationTest
         assert_text('Save profile')
         add_profile user
       else
-        assert_text('Recent pipelines and processes')
+        assert_text('Recent processes')
         assert_no_text('Save profile')
       end
     elsif invited
@@ -126,7 +126,7 @@ class UserProfileTest < ActionDispatch::IntegrationTest
     end
 
     # profile saved and in home page now
-    assert_text('Recent pipelines and processes')
+    assert_text('Recent processes')
   end
 
   [
index fe73f2734f3d9473a82c9ddb7e11498613ad645d..9d4f5905553d96f9fbc3500009dad5d11bdd49b7 100644 (file)
@@ -145,7 +145,7 @@ class WorkUnitsTest < ActionDispatch::IntegrationTest
   ].each do |template_name, preview_txt, process_txt|
     test "run a process using template #{template_name} from dashboard" do
       visit page_with_token('admin')
-      assert_text 'Recent pipelines and processes' # seeing dashboard now
+      assert_text 'Recent processes' # seeing dashboard now
 
       within('.recent-processes-actions') do
         assert page.has_link?('All processes')