[ARVADOS] updated: 2556bf9a17d39e658f91cd9b180848526415ce92
git at public.curoverse.com
git at public.curoverse.com
Mon Oct 20 14:04:37 EDT 2014
Summary of changes:
.../app/assets/javascripts/infinite_scroll.js | 96 +++++++++-------
.../app/controllers/projects_controller.rb | 2 +-
apps/workbench/test/integration/projects_test.rb | 122 +++++++++++++++++++++
apps/workbench/test/test_helper.rb | 5 +-
sdk/python/tests/run_test_server.py | 8 +-
.../test/fixtures/api_client_authorizations.yml | 6 +
services/api/test/fixtures/collections.yml | 28 +++++
services/api/test/fixtures/groups.yml | 61 ++++++++++-
services/api/test/fixtures/jobs.yml | 16 +++
services/api/test/fixtures/links.yml | 13 +++
services/api/test/fixtures/pipeline_instances.yml | 63 +++++++++++
services/api/test/fixtures/users.yml | 14 +++
12 files changed, 392 insertions(+), 42 deletions(-)
via 2556bf9a17d39e658f91cd9b180848526415ce92 (commit)
via 3844c251d4db322759a23a6370faefb7c8e27728 (commit)
via 1f168b8d94bff45ef2be842e60bed7e1c4e37317 (commit)
via 4335bce9369b5df234c5d68c4deff820ca2c28d1 (commit)
via 1f7dbdb87eee28f7f357c025f7b5cd7d1ccc8c7a (commit)
via 4418304db7b297e099e99ca9f77d846f4af6c491 (commit)
via 51c8987b2dd1696c27ee1235855a47bd86dfeb82 (commit)
via 877c538744d915852361ce0a8839d54a54bc0c9d (commit)
via 3bf405f3fd820d17b55216f120aaf95f72a05a8b (commit)
via 41a571276ca87ebb42367ca230825a2f06bdda6c (commit)
via 7a6f2613d38bf9fb99a919b3875d2851a23a253a (commit)
via 6f7456f84209e9bf5955ba4158c4ce673d876be0 (commit)
via 61f351e9e3542308fe0a41fa7f41e4de85130c24 (commit)
from 12df2994c114b62b0d07a267fdeeaea389e5adb1 (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 2556bf9a17d39e658f91cd9b180848526415ce92
Merge: 12df299 3844c25
Author: radhika <radhika at curoverse.com>
Date: Mon Oct 20 13:49:08 2014 -0400
Merge branch 'master' into 4026-project-move-admin
Conflicts:
apps/workbench/test/integration/projects_test.rb
diff --cc apps/workbench/test/integration/projects_test.rb
index 3bc7750,67abcc9..1ed11a2
--- a/apps/workbench/test/integration/projects_test.rb
+++ b/apps/workbench/test/integration/projects_test.rb
@@@ -485,24 -485,126 +485,146 @@@ class ProjectsTest < ActionDispatch::In
end
end
+ [
+ ['project with 10 collections', 10],
+ ['project with 201 collections', 201], # two pages of data
+ ].each do |project_name, amount|
+ test "scroll collections tab for #{project_name} with #{amount} objects" do
+ headless = Headless.new
+ headless.start
+ Capybara.current_driver = :selenium
+
+ visit page_with_token 'user1_with_load'
+
+ find("#projects-menu").click
+ find(".dropdown-menu a", text: project_name).click
+
+ my_collections = []
+ for i in 1..amount
+ my_collections << "Collection_#{i}"
+ end
+
+ # verify Data collections scroll
+ assert(page.has_text?("Data collections (#{amount})"), "Number of collections did not match the input amount")
+
+ click_link 'Data collections'
+ begin
+ wait_for_ajax
+ rescue
+ end
+
+ verify_collections = my_collections.dup
+ unexpected_items = []
+ collections_count = 0
+ within('.arv-project-Data_collections') do
+ page.execute_script "window.scrollBy(0,999000)"
+ begin
+ wait_for_ajax
+ rescue
+ end
+
+ # Visit all rows. If not all expected collections are found, retry
+ found_collections = page.all('tr[data-kind="arvados#collection"]')
+ collections_count = found_collections.count
+
+ (0..collections_count-1).each do |i|
+ # Found row text would be of the format "Show Collection_#{n} "
+ collection_name = found_collections[i].text.split[1]
+ if !my_collections.include? collection_name
+ unexpected_items << collection_name
+ else
+ verify_collections.delete collection_name
+ end
+ end
+
+ assert_equal true, unexpected_items.empty?, "Found unexpected items #{unexpected_items.inspect}"
+ assert_equal amount, collections_count, "Found different number of collections"
+ assert_equal true, verify_collections.empty?, "Did not find all the collections"
+ end
+ end
+ end
+
+ [
+ ['project with 10 pipelines', 10, 0],
+ ['project with 200 jobs and 10 pipelines', 10, 200],
+ ['project with 25 pipelines', 25, 0],
+ ].each do |project_name, num_pipelines, num_jobs|
+ test "scroll pipeline instances tab for #{project_name} with #{num_pipelines} pipelines and #{num_jobs} jobs" do
+ headless = Headless.new
+ headless.start
+ Capybara.current_driver = :selenium
+
+ visit page_with_token 'user1_with_load'
+
+ find("#projects-menu").click
+ find(".dropdown-menu a", text: project_name).click
+
+ my_pipelines = []
+ (1..num_pipelines).each do |i|
+ name = "pipeline_#{i}"
+ my_pipelines << name
+ end
+
+ # verify Jobs and pipelines tab scroll
+ assert(page.has_text?("Jobs and pipelines (#{num_pipelines+num_jobs})"), "Number of objects did not match the input counts")
+ click_link 'Jobs and pipelines'
+ begin
+ wait_for_ajax
+ rescue
+ end
+
+ verify_pipelines = my_pipelines.dup
+ unexpected_items = []
+ object_count = 0
+ within('.arv-project-Jobs_and_pipelines') do
+ page.execute_script "window.scrollBy(0,999000)"
+ begin
+ wait_for_ajax
+ rescue
+ end
+
+ # Visit all rows. Repeat if not all expected my_pipelines are found (inifinite scrolling should kick in)
+ pipelines_found = page.all('tr[data-kind="arvados#pipelineInstance"]')
+ found_pipeline_count = pipelines_found.count
+ (0..found_pipeline_count-1).each do |i|
+ name = pipelines_found[i].text.split[1]
+ if !my_pipelines.include? name
+ unexpected_items << name
+ else
+ verify_pipelines.delete name
+ end
+
+ assert_equal true, unexpected_items.empty?, "Found unexpected items #{unexpected_items.inspect}"
+ end
+
+ jobs_found = page.all('tr[data-kind="arvados#job"]')
+ found_job_count = jobs_found.count
+
+ assert_equal num_pipelines, found_pipeline_count, "Found different number of pipelines and jobs"
+ assert_equal num_jobs, found_job_count, 'Did not find expected number of jobs'
+ assert_equal true, verify_pipelines.empty?, "Did not find all the pipelines and jobs"
+ end
+ end
+ end
+
+ # Move button accessibility
+ [
+ ['admin', true],
+ ['active', true], # project owner
+ ['project_viewer', false],
+ ].each do |user, can_move|
+ test "#{user} can move subproject under another user's Home #{can_move}" do
+ project = api_fixture('groups')['aproject']
+ collection = api_fixture('collections')['collection_to_move_around_in_aproject']
+
+ # verify the project move button
+ visit page_with_token user, "/projects/#{project['uuid']}"
+ if can_move
+ assert page.has_link? 'Move project...'
+ else
+ assert page.has_no_link? 'Move project...'
+ end
+ end
+ end
+
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list