[ARVADOS] updated: 1e5f697d9d31c47c09c47286f5297715ed0c59c3
Git user
git at public.curoverse.com
Wed May 17 12:55:01 EDT 2017
Summary of changes:
.../workbench/app/assets/javascripts/filterable.js | 2 +-
.../test/integration/container_requests_test.rb | 55 +++++++++-------------
2 files changed, 24 insertions(+), 33 deletions(-)
via 1e5f697d9d31c47c09c47286f5297715ed0c59c3 (commit)
from 68089478becdc35c0b188349eeead4dccb4c8371 (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 1e5f697d9d31c47c09c47286f5297715ed0c59c3
Author: radhika <radhika at curoverse.com>
Date: Wed May 17 12:54:30 2017 -0400
11580: cleanup test to remove unnecessary test
diff --git a/apps/workbench/app/assets/javascripts/filterable.js b/apps/workbench/app/assets/javascripts/filterable.js
index 27473ad..5f6370c 100644
--- a/apps/workbench/app/assets/javascripts/filterable.js
+++ b/apps/workbench/app/assets/javascripts/filterable.js
@@ -55,7 +55,7 @@ function updateFilterableQueryNow($target) {
if (newquery == null || newquery == '') {
params.filters = [];
} else {
- params.filters = [['any', '@@', newquery.concat(':*')]];
+ params.filters = [['any', '@@', newquery.trim().concat(':*')]];
}
$target.data('infinite-content-params-filterable', params);
$target.data('filterable-query', newquery);
diff --git a/apps/workbench/test/integration/container_requests_test.rb b/apps/workbench/test/integration/container_requests_test.rb
index 51b6b24..6ac667e 100644
--- a/apps/workbench/test/integration/container_requests_test.rb
+++ b/apps/workbench/test/integration/container_requests_test.rb
@@ -122,40 +122,31 @@ class ContainerRequestsTest < ActionDispatch::IntegrationTest
page.assert_selector 'g.node>title', text: cr['uuid'], visible: false
end
- [
- 'active',
- 'admin',
- ].each do |token|
- test "index page as #{token} user" do
- visit page_with_token(token, "/container_requests")
-
- running_owner_active = api_fixture("container_requests", "requester_for_running")
- anon_accessible_cr = api_fixture("container_requests", "running_anonymous_accessible")
-
- # both of these CRs should be accessible to the user
- assert_selector "a[href=\"/container_requests/#{running_owner_active['uuid']}\"]", text: running_owner_active[:name]
- assert_selector "a[href=\"/container_requests/#{anon_accessible_cr['uuid']}\"]", text: anon_accessible_cr[:name]
-
- # both the active user (owner) and admin can delete the "running" container_request
- within(".cr-#{running_owner_active['uuid']}") do
- assert_not_nil first('.glyphicon-trash')
- end
+ test "index page" do
+ visit page_with_token("active", "/container_requests")
- # only admin user can delete the anonymously accessible container_request
- within(".cr-#{anon_accessible_cr['uuid']}") do
- if token == 'admin'
- assert_not_nil first('.glyphicon-trash')
- else
- assert_nil first('.glyphicon-trash')
- end
- end
+ running_owner_active = api_fixture("container_requests", "requester_for_running")
+ anon_accessible_cr = api_fixture("container_requests", "running_anonymous_accessible")
- # verify the search box in the page
- find('.recent-container-requests-filterable-control').set("anonymous")
- sleep 0.350 # Wait for 250ms debounce timer (see filterable.js)
- wait_for_ajax
- assert_no_selector "a[href=\"/container_requests/#{running_owner_active['uuid']}\"]", text: running_owner_active[:name]
- assert_selector "a[href=\"/container_requests/#{anon_accessible_cr['uuid']}\"]", text: anon_accessible_cr[:name]
+ # both of these CRs should be accessible to the user
+ assert_selector "a[href=\"/container_requests/#{running_owner_active['uuid']}\"]", text: running_owner_active[:name]
+ assert_selector "a[href=\"/container_requests/#{anon_accessible_cr['uuid']}\"]", text: anon_accessible_cr[:name]
+
+ # user can delete the "running" container_request
+ within(".cr-#{running_owner_active['uuid']}") do
+ assert_not_nil first('.glyphicon-trash')
+ end
+
+ # user can not delete the anonymously accessible container_request
+ within(".cr-#{anon_accessible_cr['uuid']}") do
+ assert_nil first('.glyphicon-trash')
end
+
+ # verify the search box in the page
+ find('.recent-container-requests-filterable-control').set("anonymous")
+ sleep 0.350 # Wait for 250ms debounce timer (see filterable.js)
+ wait_for_ajax
+ assert_no_selector "a[href=\"/container_requests/#{running_owner_active['uuid']}\"]", text: running_owner_active[:name]
+ assert_selector "a[href=\"/container_requests/#{anon_accessible_cr['uuid']}\"]", text: anon_accessible_cr[:name]
end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list