12513: Update tests, remove more unused code.
authorTom Clegg <tclegg@veritasgenetics.com>
Mon, 13 Nov 2017 19:57:29 +0000 (14:57 -0500)
committerTom Clegg <tclegg@veritasgenetics.com>
Mon, 13 Nov 2017 21:00:06 +0000 (16:00 -0500)
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

index fd58de5c76690963936ad2e353fc6291027fd767..db31501221556c4abfa45f8fe0c40d88bba9a8e8 100644 (file)
@@ -12,22 +12,11 @@ SPDX-License-Identifier: AGPL-3.0 %>
 
   # fetch children of all the active crs in one call, if there are any
   active_crs = recent_crs.each {|cr| cr if (cr.priority.andand > 0 and cr.state != 'Final' and cr.container_uuid)}
-  active_cr_uuids = active_crs.map(&:uuid)
-  active_cr_containers = active_crs.map {|cr| cr.container_uuid}.compact.uniq
-  cr_children = {}
-  if active_cr_containers.any?
-    active_cr_containers.each { |c| cr_children[c] = []}
-    cols = ContainerRequest.columns.map(&:name) - %w(id updated_at mounts)
-  end
 
   wus = {}
   outputs = []
   recent_procs.each do |p|
-    if p.uuid.in?(active_cr_uuids)
-      wu = p.work_unit(nil, child_objects=cr_children[p.container_uuid])
-    else
-      wu = p.work_unit
-    end
+    wu = p.work_unit
 
     wus[p] = wu
     outputs << wu.outputs
index bdf983ff43f2cb2cd3fe16a90033c3a2d4987aba..61c882d9f9908ae83e22aaa6a220bfc28e8fb1f0 100644 (file)
@@ -439,7 +439,7 @@ class ProjectsControllerTest < ActionController::TestCase
         {
           fixture: 'container_requests',
           state: 'running',
-          selectors: [['div.progress', true]]
+          selectors: [['.label-info', true, 'Running']]
         },
         {
           fixture: 'pipeline_instances',
@@ -450,7 +450,7 @@ class ProjectsControllerTest < ActionController::TestCase
         {
           fixture: 'pipeline_instances',
           state: 'pipeline_in_running_state',
-          selectors: [['div.progress', true]]
+          selectors: [['.label-info', true, 'Running']]
         },
       ].each do |c|
         uuid = api_fixture(c[:fixture])[c[:state]]['uuid']