[ARVADOS] updated: 3e515256d1ce0c7c09f4f8454f9761f261fb8b71
git at public.curoverse.com
git at public.curoverse.com
Fri Feb 12 14:04:28 EST 2016
Summary of changes:
apps/workbench/app/views/projects/show.html.erb | 4 ++--
apps/workbench/test/integration/projects_test.rb | 19 +++++++++++++++++++
.../functional/arvados/v1/groups_controller_test.rb | 12 ------------
3 files changed, 21 insertions(+), 14 deletions(-)
via 3e515256d1ce0c7c09f4f8454f9761f261fb8b71 (commit)
from 0d8d1ff55e2ba154b396e1879928a126745c1089 (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 3e515256d1ce0c7c09f4f8454f9761f261fb8b71
Author: radhika <radhika at curoverse.com>
Date: Fri Feb 12 14:03:57 2016 -0500
8286: add an integration test to star / unstar project by clicking on the icon.
diff --git a/apps/workbench/app/views/projects/show.html.erb b/apps/workbench/app/views/projects/show.html.erb
index 2b0a574..0f9df76 100644
--- a/apps/workbench/app/views/projects/show.html.erb
+++ b/apps/workbench/app/views/projects/show.html.erb
@@ -6,11 +6,11 @@
<% starred = false %>
<% starred = true if is_starred %>
<% if starred %>
- <%= link_to(url_for({action: 'star', status: 'delete', id: @object.uuid, controller: 'projects'}), method: :post, class: "btn btn-xs", title: "Undo favorite") do %>
+ <%= link_to(url_for({action: 'star', status: 'delete', id: @object.uuid, controller: 'projects'}), method: :post, class: "btn btn-xs", title: "Remove from list of favorites") do %>
<i class="fa fa-fw fa-star"></i>
<% end %>
<% else %>
- <%= link_to(url_for({action: 'star', status: 'create', id: @object.uuid, controller: 'projects'}), method: :post, class: "btn btn-xs", title: "Mark favorite") do %>
+ <%= link_to(url_for({action: 'star', status: 'create', id: @object.uuid, controller: 'projects'}), method: :post, class: "btn btn-xs", title: "Add to list of favorites") do %>
<i class="fa fa-fw fa-star-o"></i>
<% end %>
<% end %>
diff --git a/apps/workbench/test/integration/projects_test.rb b/apps/workbench/test/integration/projects_test.rb
index 64a5471..5a71b76 100644
--- a/apps/workbench/test/integration/projects_test.rb
+++ b/apps/workbench/test/integration/projects_test.rb
@@ -709,4 +709,23 @@ class ProjectsTest < ActionDispatch::IntegrationTest
assert page.has_text?('Unrestricted public data'), 'No text - Unrestricted public data'
assert page.has_text?('An anonymously accessible project'), 'No text - An anonymously accessible project'
end
+
+ test "test star and unstar project" do
+ visit page_with_token 'active', "/projects/#{api_fixture('groups')['anonymously_accessible_project']['uuid']}"
+
+ # add to favorites
+ find('.fa-star-o').click
+
+ find("#projects-menu").click
+ within('.dropdown-menu') do
+ assert_selector 'li', text: 'Unrestricted public data'
+ end
+
+ # remove from favotires
+ find('.fa-star').click
+ find("#projects-menu").click
+ within('.dropdown-menu') do
+ assert_no_selector 'li', text: 'Unrestricted public data'
+ end
+ end
end
diff --git a/services/api/test/functional/arvados/v1/groups_controller_test.rb b/services/api/test/functional/arvados/v1/groups_controller_test.rb
index 98c06ea..6623c72 100644
--- a/services/api/test/functional/arvados/v1/groups_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/groups_controller_test.rb
@@ -423,16 +423,4 @@ class Arvados::V1::GroupsControllerTest < ActionController::TestCase
end
assert_equal true, found_projects.include?(groups(:starred_and_shared_active_user_project).uuid)
end
-
- test "deleting a project results in deleting it's star links" do
- skip "Delete is not yet supported for groups with share and other links"
-
- authorize_with :admin
- post :destroy, id: groups(:starred_and_shared_active_user_project).uuid
- assert_response :success
-
- @controller = Arvados::V1::LinksController.new
- get :show, {id: links(:star_shared_project_for_project_viewer).uuid}
- assert_response 404
- end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list