[ARVADOS] updated: 1.1.3-79-g31e3106
Git user
git at public.curoverse.com
Fri Feb 23 16:29:46 EST 2018
Summary of changes:
.../app/controllers/work_units_controller.rb | 6 ++-
.../views/work_units/_show_all_processes.html.erb | 4 +-
.../test/controllers/work_units_controller_test.rb | 2 +-
apps/workbench/test/integration/work_units_test.rb | 47 ++++++++++++++--------
4 files changed, 39 insertions(+), 20 deletions(-)
via 31e3106b0f4b5ec8cd7e251bc6827a64063c1b0c (commit)
from 6a5762b6515b92ec57a2f0a5583346ca5dab2dd6 (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 31e3106b0f4b5ec8cd7e251bc6827a64063c1b0c
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date: Fri Feb 23 16:29:06 2018 -0500
12315: Propagate show_children to infinite scroll pages. Fix & add tests.
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>
diff --git a/apps/workbench/app/controllers/work_units_controller.rb b/apps/workbench/app/controllers/work_units_controller.rb
index dc10d97..d289682 100644
--- a/apps/workbench/app/controllers/work_units_controller.rb
+++ b/apps/workbench/app/controllers/work_units_controller.rb
@@ -17,6 +17,9 @@ class WorkUnitsController < ApplicationController
@limit = 20
@filters = @filters || []
+ pipelines = []
+ jobs = []
+
# get next page of pipeline_instances
if PipelineInstance.api_exists?(:index)
filters = @filters + [["uuid", "is_a", ["arvados#pipelineInstance"]]]
@@ -42,7 +45,8 @@ class WorkUnitsController < ApplicationController
if @objects.any?
@next_page_filters = next_page_filters('<=')
@next_page_href = url_for(partial: :all_processes_rows,
- filters: @next_page_filters.to_json)
+ filters: @next_page_filters.to_json,
+ show_children: params[:show_children])
preload_links_for_objects(@objects.to_a)
else
@next_page_href = nil
diff --git a/apps/workbench/app/views/work_units/_show_all_processes.html.erb b/apps/workbench/app/views/work_units/_show_all_processes.html.erb
index c06a88e..0d6d831 100644
--- a/apps/workbench/app/views/work_units/_show_all_processes.html.erb
+++ b/apps/workbench/app/views/work_units/_show_all_processes.html.erb
@@ -11,8 +11,8 @@ SPDX-License-Identifier: AGPL-3.0 %>
</div>
<div class="checkbox">
<label>
- <input id="ExcludeChildProcs" type="checkbox" class="filterable-control"
- data-on-value="{"show_c1hildren":true}"
+ <input id="IncludeChildProcs" type="checkbox" class="filterable-control"
+ data-on-value="{"show_children":true}"
data-off-value="{}"
data-filterable-target="#all-processes-scroll" />
Show child processes
diff --git a/apps/workbench/test/controllers/work_units_controller_test.rb b/apps/workbench/test/controllers/work_units_controller_test.rb
index 342cd7a..a698b8d 100644
--- a/apps/workbench/test/controllers/work_units_controller_test.rb
+++ b/apps/workbench/test/controllers/work_units_controller_test.rb
@@ -32,7 +32,7 @@ class WorkUnitsControllerTest < ActionController::TestCase
'/container_requests/zzzzz-xvhdp-cr4completedcr2']],
].each do |search_filter, expected_min, expected_max, expected, not_expected|
test "all_processes page for search filter '#{search_filter}'" do
- work_units_index(filters: [['any','@@', search_filter]])
+ work_units_index(filters: [['any','@@', search_filter]], show_children: true)
assert_response :success
# Verify that expected number of processes are found
diff --git a/apps/workbench/test/integration/work_units_test.rb b/apps/workbench/test/integration/work_units_test.rb
index 511e511..4dd4495 100644
--- a/apps/workbench/test/integration/work_units_test.rb
+++ b/apps/workbench/test/integration/work_units_test.rb
@@ -12,21 +12,35 @@ class WorkUnitsTest < ActionDispatch::IntegrationTest
need_javascript
end
- test "scroll all_processes page" do
- expected_min, expected_max, expected, not_expected = [
- 25, 100,
- ['/pipeline_instances/zzzzz-d1hrv-1yfj61234abcdk3',
- '/pipeline_instances/zzzzz-d1hrv-jobspeccomponts',
- '/jobs/zzzzz-8i9sb-grx15v5mjnsyxk7',
- '/jobs/zzzzz-8i9sb-n7omg50bvt0m1nf',
- '/container_requests/zzzzz-xvhdp-cr4completedcr2',
- '/container_requests/zzzzz-xvhdp-cr4requestercn2'],
- ['/pipeline_instances/zzzzz-d1hrv-scarxiyajtshq3l',
- '/container_requests/zzzzz-xvhdp-oneof60crs00001']
- ]
-
+ [[true, 25, 100,
+ ['/pipeline_instances/zzzzz-d1hrv-1yfj61234abcdk3',
+ '/pipeline_instances/zzzzz-d1hrv-jobspeccomponts',
+ '/jobs/zzzzz-8i9sb-grx15v5mjnsyxk7',
+ '/jobs/zzzzz-8i9sb-n7omg50bvt0m1nf',
+ '/container_requests/zzzzz-xvhdp-cr4completedcr2',
+ '/container_requests/zzzzz-xvhdp-cr4requestercn2'],
+ ['/pipeline_instances/zzzzz-d1hrv-scarxiyajtshq3l',
+ '/container_requests/zzzzz-xvhdp-oneof60crs00001']],
+ [false, 25, 100,
+ ['/pipeline_instances/zzzzz-d1hrv-1yfj61234abcdk3',
+ '/pipeline_instances/zzzzz-d1hrv-jobspeccomponts',
+ '/container_requests/zzzzz-xvhdp-cr4completedcr2'],
+ ['/pipeline_instances/zzzzz-d1hrv-scarxiyajtshq3l',
+ '/container_requests/zzzzz-xvhdp-oneof60crs00001',
+ '/jobs/zzzzz-8i9sb-grx15v5mjnsyxk7',
+ '/jobs/zzzzz-8i9sb-n7omg50bvt0m1nf',
+ '/container_requests/zzzzz-xvhdp-cr4requestercn2'
+ ]]
+ ].each do |expects|
+ test "scroll all_processes page with show_children #{expects[0]}" do
+ show_children, expected_min, expected_max, expected, not_expected = expects
visit page_with_token('active', "/all_processes")
+ if show_children
+ find('#IncludeChildProcs').click
+ wait_for_ajax
+ end
+
page_scrolls = expected_max/20 + 2
within('.arv-recent-all-processes') do
(0..page_scrolls).each do |i|
@@ -43,13 +57,13 @@ class WorkUnitsTest < ActionDispatch::IntegrationTest
found_count = found_items.count
if expected_min == expected_max
assert_equal(true, found_count == expected_min,
- "Not found expected number of items. Expected #{expected_min} and found #{found_count}")
+ "Not found expected number of items. Expected #{expected_min} and found #{found_count}")
assert page.has_no_text? 'request failed'
else
assert_equal(true, found_count>=expected_min,
- "Found too few items. Expected at least #{expected_min} and found #{found_count}")
+ "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}")
+ "Found too many items. Expected at most #{expected_max} and found #{found_count}")
end
# verify that all expected uuid links are found
@@ -61,6 +75,7 @@ class WorkUnitsTest < ActionDispatch::IntegrationTest
not_expected.each do |link|
assert_no_selector "a[href=\"#{link}\"]"
end
+ end
end
[
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list