[ARVADOS] updated: 897e6cc8175865575a809e9fcc6d40ea566ee930

git at public.curoverse.com git at public.curoverse.com
Thu Aug 21 11:04:03 EDT 2014


Summary of changes:
 .../app/controllers/projects_controller.rb         |  2 +-
 .../app/views/collections/_choose_rows.html.erb    |  6 +++-
 apps/workbench/app/views/collections/show.html.erb |  2 +-
 .../workbench/test/integration/collections_test.rb | 33 ----------------------
 .../test/integration/pipeline_instances_test.rb    |  4 +--
 5 files changed, 9 insertions(+), 38 deletions(-)

       via  897e6cc8175865575a809e9fcc6d40ea566ee930 (commit)
      from  7c78bea1fde0f581e31338e860ecb89ef91285d9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 897e6cc8175865575a809e9fcc6d40ea566ee930
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Thu Aug 21 11:03:58 2014 -0400

    3504: Fixed preload_links_for_objects to use @objects.to_a.  Fix collections
    page to restore link names.  Remove obsolete tests for "persist" button.  Tweak
    pipeline instance tests.

diff --git a/apps/workbench/app/controllers/projects_controller.rb b/apps/workbench/app/controllers/projects_controller.rb
index 1f4cd3f..d9ec0a6 100644
--- a/apps/workbench/app/controllers/projects_controller.rb
+++ b/apps/workbench/app/controllers/projects_controller.rb
@@ -178,7 +178,7 @@ class ProjectsController < ApplicationController
       @next_page_href = next_page_href(partial: :contents_rows)
     end
 
-    preload_links_for_objects(@objects)
+    preload_links_for_objects(@objects.to_a)
   end
 
   def show
diff --git a/apps/workbench/app/views/collections/_choose_rows.html.erb b/apps/workbench/app/views/collections/_choose_rows.html.erb
index 036e619..27b66e4 100644
--- a/apps/workbench/app/views/collections/_choose_rows.html.erb
+++ b/apps/workbench/app/views/collections/_choose_rows.html.erb
@@ -3,7 +3,11 @@
          data-preview-href="<%= chooser_preview_url_for object %>"
          style="margin-left: 1em; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #DDDDDD">
       <i class="fa fa-fw fa-archive"></i>
-      <%= object.name %>
+      <% if object.respond_to? :name %>
+        <%= object.name %>
+      <% else %>
+        <%= object.uuid %>
+      <% end %>
       <% links_for_object(object).each do |tag| %>
         <% if tag.link_class == 'tag' %>
           <span class="label label-info"><%= tag.name %></span>
diff --git a/apps/workbench/app/views/collections/show.html.erb b/apps/workbench/app/views/collections/show.html.erb
index 183d6d3..cc19000 100644
--- a/apps/workbench/app/views/collections/show.html.erb
+++ b/apps/workbench/app/views/collections/show.html.erb
@@ -22,7 +22,7 @@
     <div class="panel panel-info">
       <div class="panel-heading">
 	<h3 class="panel-title">
-          <% if @object.uuid.match /[0-9a-f]{32}/ %>
+          <% if @name_link.nil? and @object.uuid.match /[0-9a-f]{32}/ %>
             Content hash <%= @object.portable_data_hash %>
           <% else %>
 	    <%= if @object.respond_to? :name
diff --git a/apps/workbench/test/integration/collections_test.rb b/apps/workbench/test/integration/collections_test.rb
index 19720cb..0e5f219 100644
--- a/apps/workbench/test/integration/collections_test.rb
+++ b/apps/workbench/test/integration/collections_test.rb
@@ -3,39 +3,6 @@ require 'selenium-webdriver'
 require 'headless'
 
 class CollectionsTest < ActionDispatch::IntegrationTest
-  def change_persist oldstate, newstate
-    find "div[data-persistent-state='#{oldstate}']"
-    page.assert_no_selector "div[data-persistent-state='#{newstate}']"
-    find('.btn', text: oldstate.capitalize).click
-    find '.btn', text: newstate.capitalize
-    page.assert_no_selector '.btn', text: oldstate.capitalize
-    find "div[data-persistent-state='#{newstate}']"
-    page.assert_no_selector "div[data-persistent-state='#{oldstate}']"
-  end
-
-  test "Flip persistent switch at /collections" do
-    Capybara.current_driver = Capybara.javascript_driver
-    uuid = api_fixture('collections')['foo_file']['uuid']
-    visit page_with_token('active', '/collections')
-    within "tr[data-object-uuid='#{uuid}']" do
-      change_persist 'cache', 'persistent'
-    end
-    # Refresh page and make sure the change was committed.
-    visit current_path
-    within "tr[data-object-uuid='#{uuid}']" do
-      change_persist 'persistent', 'cache'
-    end
-  end
-
-  test 'Flip persistent switch on collection#show' do
-    Capybara.current_driver = Capybara.javascript_driver
-    uuid = api_fixture('collections')['foo_file']['uuid']
-    visit page_with_token('active', "/collections/#{uuid}")
-    change_persist 'cache', 'persistent'
-    visit current_path
-    change_persist 'persistent', 'cache'
-  end
-
   test "Collection page renders default name links" do
     uuid = api_fixture('collections')['foo_file']['uuid']
     coll_name = api_fixture('links')['foo_collection_name_in_aproject']['name']
diff --git a/apps/workbench/test/integration/pipeline_instances_test.rb b/apps/workbench/test/integration/pipeline_instances_test.rb
index 6385393..9c0eb88 100644
--- a/apps/workbench/test/integration/pipeline_instances_test.rb
+++ b/apps/workbench/test/integration/pipeline_instances_test.rb
@@ -40,8 +40,8 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
     visit '/projects'
     find('.arv-project-list a,button', text: 'A Project').click
     find('.btn', text: 'Add data').click
-    find('span', text: 'foo_tag').click
     within('.modal-dialog') do
+      first('span', text: 'foo_tag').click
       find('.btn', text: 'Add').click
     end
     using_wait_time(Capybara.default_wait_time * 3) do
@@ -49,7 +49,7 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
     end
 
     click_link 'Jobs and pipelines'
-    find('tr[data-kind="arvados#pipelineInstance"]', text: 'New pipeline instance').
+    find('tr[data-kind="arvados#pipelineInstance"]', text: '(none)').
       find('a', text: 'Show').
       click
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list