[ARVADOS] updated: 8e209b3cc2065c4a52d7bdcb2c4c651b3f450d0d

git at public.curoverse.com git at public.curoverse.com
Fri Nov 7 22:50:02 EST 2014


Summary of changes:
 .../app/views/pipeline_instances/index.html.erb    | 17 +++++------------
 .../test/integration/pipeline_instances_test.rb    | 22 +++++++++++++---------
 2 files changed, 18 insertions(+), 21 deletions(-)

       via  8e209b3cc2065c4a52d7bdcb2c4c651b3f450d0d (commit)
      from  e993707e7a20ec37f4023bcf709fc77adce3857d (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 8e209b3cc2065c4a52d7bdcb2c4c651b3f450d0d
Author: radhika <radhika at curoverse.com>
Date:   Fri Nov 7 22:49:38 2014 -0500

    4024: simplify search box

diff --git a/apps/workbench/app/views/pipeline_instances/index.html.erb b/apps/workbench/app/views/pipeline_instances/index.html.erb
index 901dbbc..c4adf5e 100644
--- a/apps/workbench/app/views/pipeline_instances/index.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/index.html.erb
@@ -4,18 +4,11 @@
    
 <% end rescue nil %>
 
-  <%= form_tag pipeline_instances_path, method: 'get', remote: true, class: 'form-search' do %>
-    <div class="input-group">
-      <input type="text" class="form-control filterable-control recent-pipeline-instances-filterable-control"
-             placeholder="Search pipeline instances"
-             data-filterable-target="#recent-pipeline-instances"/>
-       <span class="input-group-btn">
-         <%= button_tag(class: 'btn btn-info') do %>
-         <span class="glyphicon glyphicon-search"></span>
-         <% end %>
-       </span>
-    </div>
-  <% end %>
+  <div class="input-group">
+    <input type="text" class="form-control filterable-control recent-pipeline-instances-filterable-control"
+           placeholder="Search pipeline instances"
+           data-filterable-target="#recent-pipeline-instances"/>
+  </div>
 <% end %>
 
 <%= render file: 'application/index.html.erb', locals: local_assigns %>
diff --git a/apps/workbench/test/integration/pipeline_instances_test.rb b/apps/workbench/test/integration/pipeline_instances_test.rb
index c9e6c7c..cdaa3f1 100644
--- a/apps/workbench/test/integration/pipeline_instances_test.rb
+++ b/apps/workbench/test/integration/pipeline_instances_test.rb
@@ -369,17 +369,16 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
     ['fuse', nil, 2, 20],                           # has 2 as of 11-07-2014
     ['fuse', 'FUSE project', 1, 1],                 # 1 with this name
     ['user1_with_load', nil, 30, 100],              # has 37 as of 11-07-2014
-    ['user1_with_load', '000010pipelines', 10, 10], # owned_by the project zzzzz-j7d0g-000010pipelines
     ['user1_with_load', 'pipeline_10', 2, 2],       # 2 with this name
+    ['user1_with_load', '000010pipelines', 10, 10], # owned_by the project zzzzz-j7d0g-000010pipelines
+    ['user1_with_load', '000025pipelines', 25, 25], # owned_by the project zzzzz-j7d0g-000025pipelines, two pages
     ['admin', nil, 40, 200],
     ['admin', 'FUSE project', 1, 1],
     ['admin', 'pipeline_10', 2, 2],
-    ['admin', 'containing at least two', 2, 100],
     ['active', 'containing at least two', 2, 100],  # component description
+    ['admin', 'containing at least two', 2, 100],
     ['active', nil, 10, 100],
     ['active', 'no such match', 0, 0],
-    ['user1_with_load', 'pipeline_', 20, 20],       # >20 such, but scrolling disabled when search filter is used
-    ['admin', 'pipeline_', 20, 20],                 # >20 such, but scrolling disabled when search filter is used
   ].each do |user, search_filter, expected_min, expected_max|
     test "scroll pipeline instances page for #{user} with search filter #{search_filter}
           and expect more than #{expected_min} and less than #{expected_max}" do
@@ -401,13 +400,18 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
         end
       end
 
-      # Visit all rows and verify that expected number of pipeline instances are found
+      # Verify that expected number of pipeline instances are found
       found_items = page.all('tr[data-kind="arvados#pipelineInstance"]')
       found_count = found_items.count
-      assert_equal(true, found_count>=expected_min,
-        "Found too few items. Expected at least #{expected_min} and found #{found_count}")
-      assert_equal(true, found_count<=expected_max,
-        "Found too many items. Expected at most #{expected_max} and found #{found_count}")
+      if expected_min == expected_max
+        assert_equal(true, found_count == expected_min,
+          "Not found expected number of items. Expected at least #{expected_min} and found #{found_count}")
+      else
+        assert_equal(true, found_count>=expected_min,
+          "Found too few items. Expected at least #{expected_min} and found #{found_count}")
+        assert_equal(true, found_count<=expected_max,
+          "Found too many items. Expected at most #{expected_max} and found #{found_count}")
+      end
     end
   end
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list