5492: add "Home project" link to my account menu.
authorRadhika Chippada <radhika@curoverse.com>
Mon, 6 Apr 2015 16:43:54 +0000 (12:43 -0400)
committerRadhika Chippada <radhika@curoverse.com>
Mon, 6 Apr 2015 16:43:54 +0000 (12:43 -0400)
apps/workbench/app/views/layouts/body.html.erb
apps/workbench/test/integration/application_layout_test.rb

index fbbd0fac26e32793d50f095973933750a52cbdef..4875690ea5f696d4084a5a3f4439342cfcf0d84c 100644 (file)
@@ -51,6 +51,7 @@
               </a>
               <ul class="dropdown-menu" role="menu">
                 <% if current_user.is_active %>
+                <li role="menuitem"><a href="/projects/<%=current_user.uuid%>" role="menuitem"><i class="fa fa-home fa-fw"></i> Home project </a></li>
                 <li role="menuitem"><a href="/manage_account" role="menuitem"><i class="fa fa-key fa-fw"></i> Manage account</a></li>
                 <% if Rails.configuration.user_profile_form_fields %>
                   <li role="menuitem"><a href="/users/<%=current_user.uuid%>/profile" role="menuitem"><i class="fa fa-key fa-fw"></i> Manage profile</a></li>
index 84acdc61148e91b14a1b365928dec786a5f612e9..a5789acae33374099f89e18e3ade8690ea23159e 100644 (file)
@@ -47,6 +47,7 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
             assert page.has_no_link?('Not active'), 'Found link - Not active'
             assert page.has_no_link?('Sign agreements'), 'Found link - Sign agreements'
 
+            assert_selector "a[href=\"/projects/#{user['uuid']}\"]", text: 'Home project'
             assert page.has_link?('Manage account'), 'No link - Manage account'
 
             if profile_config
@@ -55,6 +56,7 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
               assert page.has_no_link?('Manage profile'), 'Found link - Manage profile'
             end
           else
+            assert_no_selector 'a', text: 'Home project'
             assert page.has_no_link?('Manage account'), 'Found link - Manage account'
             assert page.has_no_link?('Manage profile'), 'Found link - Manage profile'
           end