[ARVADOS] updated: 008cec917d19fadc011fdb1d61d7b54ffe1d4dda

git at public.curoverse.com git at public.curoverse.com
Fri Nov 7 10:29:20 EST 2014


Summary of changes:
 .../views/pipeline_instances/_show_recent.html.erb |  2 +-
 .../pipeline_instances/_show_recent_rows.html.erb  |  2 +-
 .../test/integration/pipeline_instances_test.rb    | 29 ++++++++++++++++++++++
 3 files changed, 31 insertions(+), 2 deletions(-)

       via  008cec917d19fadc011fdb1d61d7b54ffe1d4dda (commit)
      from  b917e8a2ebf8c51729ecde1d3cc3396d2fcf0034 (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 008cec917d19fadc011fdb1d61d7b54ffe1d4dda
Author: radhika <radhika at curoverse.com>
Date:   Fri Nov 7 10:12:09 2014 -0500

    4024: add integration tests for pipeline_instances page infinite scrolling.

diff --git a/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb b/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb
index cc4b957..288fe13 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb
@@ -1,6 +1,6 @@
 <%= form_tag do |f| %>
 
-<table class="table table-condensed table-fixedlayout">
+<table class="table table-condensed table-fixedlayout arv-recent-pipeline-instances">
   <colgroup>
     <col width="5%" />
     <col width="15%" />
diff --git a/apps/workbench/app/views/pipeline_instances/_show_recent_rows.html.erb b/apps/workbench/app/views/pipeline_instances/_show_recent_rows.html.erb
index e8406dc..f369c55 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_recent_rows.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_recent_rows.html.erb
@@ -1,5 +1,5 @@
 <% @objects.sort_by { |ob| ob.created_at }.reverse.each do |ob| %>
-    <tr data-object-uuid="<%= ob.uuid %>">
+    <tr data-object-uuid="<%= ob.uuid %>" data-kind="<%= ob.kind %>" >
       <td>
         <%= check_box_tag 'uuids[]', ob.uuid, false, :class => 'persistent-selection' %>
       </td><td>
diff --git a/apps/workbench/test/integration/pipeline_instances_test.rb b/apps/workbench/test/integration/pipeline_instances_test.rb
index 7095a87..3a80220 100644
--- a/apps/workbench/test/integration/pipeline_instances_test.rb
+++ b/apps/workbench/test/integration/pipeline_instances_test.rb
@@ -364,4 +364,33 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
         "Time difference did not match for start_at #{start_at}, finished_at #{finished_at}, ran_for #{match[2]}")
     end
   end
+
+  [
+    ['fuse', 2, 20],              # has  2 pipeline instances on 11-07-2014
+    ['user1_with_load', 30, 100], # has 37 pipeline instances on 11-07-2014
+  ].each do |user, expected_min, expected_max|
+    test "scroll pipeline instances page for #{user} and expect more than #{expected_min} and less than #{expected_max}" do
+      visit page_with_token(user, "/pipeline_instances")
+
+      num_pages = expected_max/20 + 1 # pipeline_instances page uses 20 for page size
+      within('.arv-recent-pipeline-instances') do
+        (0..num_pages).each do |i|
+          page.execute_script "window.scrollBy(0,999000)"
+          begin
+            wait_for_ajax
+          rescue
+          end
+        end
+      end
+
+      # Visit all rows and 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}")
+    end
+  end
+
 end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list