From 549adc0fdf4731cee1bae2aac58b959266db26d7 Mon Sep 17 00:00:00 2001 From: radhika Date: Tue, 16 Feb 2016 12:00:09 -0500 Subject: [PATCH] 8286: also include link to Home in favorites section of the Projects dropdown, so that the user does not have to scroll through all of his favorites to seek in MyProjects section. --- .../app/views/application/_projects_tree_menu.html.erb | 5 +++++ apps/workbench/test/integration/projects_test.rb | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/apps/workbench/app/views/application/_projects_tree_menu.html.erb b/apps/workbench/app/views/application/_projects_tree_menu.html.erb index ad2620d344..a680c69ce3 100644 --- a/apps/workbench/app/views/application/_projects_tree_menu.html.erb +++ b/apps/workbench/app/views/application/_projects_tree_menu.html.erb @@ -3,6 +3,11 @@ +
  • + <%= project_link_to.call({object: current_user, depth: 0}) do %> + Home + <% end %> +
  • <% (starred_projects).each do |pnode| %>
  • <%= project_link_to.call({object: pnode, depth: 0}) do%> diff --git a/apps/workbench/test/integration/projects_test.rb b/apps/workbench/test/integration/projects_test.rb index 2cc6a45f51..01e84b1c02 100644 --- a/apps/workbench/test/integration/projects_test.rb +++ b/apps/workbench/test/integration/projects_test.rb @@ -39,7 +39,10 @@ class ProjectsTest < ActionDispatch::IntegrationTest test 'Create a project and move it into a different project' do visit page_with_token 'active', '/projects' find("#projects-menu").click - find(".dropdown-menu a", text: "Home").click + within('.dropdown-menu') do + first('li', text: 'Home').click + end + wait_for_ajax find('.btn', text: "Add a subproject").click within('h2') do @@ -51,7 +54,10 @@ class ProjectsTest < ActionDispatch::IntegrationTest visit '/projects' find("#projects-menu").click - find(".dropdown-menu a", text: "Home").click + within('.dropdown-menu') do + first('li', text: 'Home').click + end + wait_for_ajax find('.btn', text: "Add a subproject").click within('h2') do find('.fa-pencil').click -- 2.30.2