4458: breadcrumbs now visible in small window sizes; also, use user icon instead...
authorRadhika Chippada <radhika@curoverse.com>
Thu, 30 Apr 2015 18:19:42 +0000 (14:19 -0400)
committerRadhika Chippada <radhika@curoverse.com>
Thu, 30 Apr 2015 18:19:42 +0000 (14:19 -0400)
apps/workbench/app/views/layouts/application.html.erb
apps/workbench/app/views/layouts/body.html.erb
apps/workbench/test/integration/anonymous_access_test.rb
apps/workbench/test/integration/application_layout_test.rb
apps/workbench/test/integration/errors_test.rb
apps/workbench/test/integration/user_manage_account_test.rb
apps/workbench/test/integration/user_profile_test.rb

index cdc47c17169401995a24a77c9e2a8cdcbc46d72f..67756e7f8a77b02bc175f69a6277d84ba157bf36 100644 (file)
@@ -37,9 +37,9 @@
     @media (max-width: 979px) { body { padding-top: 0; } }
 
     @media (max-width: 767px) {
-    .breadcrumbs {
-    display: none;
-    }
+      .breadcrumbs {
+        padding-top: 0;
+      }
     }
   </style>
   <link href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.css" rel="stylesheet">
index 0509da800fab16ce4f512a47c2db954ffdee03d2..9f253a47a5915848f52e6023c0727279db940c62 100644 (file)
             <li class="dropdown notification-menu">
               <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="notifications-menu">
                 <span class="badge badge-alert notification-count"><%= user_notifications.length if user_notifications.any? %></span>
-                <%= current_user.email %> <span class="caret"></span>
+                <span class="fa fa-lg fa-user"></span>
+                <span class="caret"></span>
               </a>
               <ul class="dropdown-menu" role="menu">
+                <li role="presentation" class="dropdown-header">
+                  <%= current_user.email %>
+                </li>
                 <% 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>
@@ -72,6 +76,7 @@
               <li class="dropdown">
                 <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="system-menu">
                   <span class="fa fa-lg fa-gear"></span>
+                  <span class="caret"></span>
                 </a>
                 <ul class="dropdown-menu" role="menu">
                   <li role="presentation" class="dropdown-header">
           <li class="dropdown help-menu">
             <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="arv-help">
               <span class="fa fa-lg fa-question-circle"></span>
+              <span class="caret"></span>
             </a>
             <ul class="dropdown-menu">
+              <li role="presentation" class="dropdown-header">
+                Help
+              </li>
               <li>
               <%= link_to raw('<i class="fa fa-fw fa-info"></i> Getting Started ...'), "#",
                    {'data-toggle' => "modal", 'data-target' => '#getting-started-modal-window'}  %>
index 18c5b7dfcb9c36eda3f31cf4dd095e6f46484eb6..1e486d8fef662ea241998ae835c4a2360e16b7bf 100644 (file)
@@ -23,8 +23,8 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest
       end
       within('.navbar-fixed-top') do
         assert_selector 'a', text: Rails.configuration.site_name.downcase
-        assert_selector 'a', text: "#{user['email']}"
-        find('a', text: "#{user['email']}").click
+        assert(page.has_link?("notifications-menu"), 'no user menu')
+        page.find("#notifications-menu").click
         within('.dropdown-menu') do
           assert_selector 'a', text: 'Log out'
         end
index 3b449b9a83110e5f8edf79fc7bd66dff00bd96aa..b6a501f924e690012d2b3f96a646ccb857c743a3 100644 (file)
@@ -40,8 +40,8 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
       else
         # my account menu
         assert_selector 'a', text: Rails.configuration.site_name.downcase
-        assert page.has_link?("#{user['email']}"), 'Not found link - email'
-        find('a', text: "#{user['email']}").click
+        assert(page.has_link?("notifications-menu"), 'no user menu')
+        page.find("#notifications-menu").click
         within('.dropdown-menu') do
           if user['is_active']
             assert page.has_no_link?('Not active'), 'Found link - Not active'
index d2b8fd6fab956a19a0d259094181191dd9814a7b..06e17d617f10d0ffafede1cad61a055e4ec42bbf 100644 (file)
@@ -9,7 +9,7 @@ class ErrorsTest < ActionDispatch::IntegrationTest
 
   test "error page renders user navigation" do
     visit(page_with_token("active", "/collections/#{BAD_UUID}"))
-    assert(page.has_text?(api_fixture("users")["active"]["email"]),
+    assert(page.has_link?("notifications-menu"),
            "User information missing from error page")
     assert(page.has_no_text?(/log ?in/i),
            "Logged in user prompted to log in on error page")
@@ -17,7 +17,7 @@ class ErrorsTest < ActionDispatch::IntegrationTest
 
   test "no user navigation with expired token" do
     visit(page_with_token("expired", "/collections/#{BAD_UUID}"))
-    assert(page.has_no_text?(api_fixture("users")["active"]["email"]),
+    assert(page.has_no_link?("notifications-menu"),
            "Page visited with expired token included user information")
     assert(page.has_selector?("a", text: /log ?in/i),
            "Login prompt missing on expired token error page")
index 6d680e2d67fe2926c6cbb9177970d5ef9bdeec86..e50907bf8b3d8a67c6f307faab011b19aa4210c7 100644 (file)
@@ -9,7 +9,7 @@ class UserManageAccountTest < ActionDispatch::IntegrationTest
   def verify_manage_account user
     if user['is_active']
       within('.navbar-fixed-top') do
-        find('a', text: "#{user['email']}").click
+        page.find("#notifications-menu").click
         within('.dropdown-menu') do
           find('a', text: 'Manage account').click
         end
@@ -24,7 +24,7 @@ class UserManageAccountTest < ActionDispatch::IntegrationTest
       add_and_verify_ssh_key
     else  # inactive user
       within('.navbar-fixed-top') do
-        find('a', text: "#{user['email']}").click
+        page.find("#notifications-menu").click
         within('.dropdown-menu') do
           assert page.has_no_link?('Manage profile'), 'Found link - Manage profile'
         end
@@ -162,7 +162,7 @@ class UserManageAccountTest < ActionDispatch::IntegrationTest
     # Revisit the page and verify the request sent message along with
     # the request button.
     within('.navbar-fixed-top') do
-      find('a', text: 'spectator').click
+      page.find("#notifications-menu").click
       within('.dropdown-menu') do
         find('a', text: 'Manage account').click
       end
index 9fa7afa8f0b2fb769fa9c81de914ad8f04658b16..3aac6a0ea08375b7c152babf1d9086553f9af8c8 100644 (file)
@@ -47,8 +47,8 @@ class UserProfileTest < ActionDispatch::IntegrationTest
         assert page.has_link?('Log in'), 'Not found link - Log in'
       else
         # my account menu
-        assert page.has_link?("#{user['email']}"), 'Not found link - email'
-        find('a', text: "#{user['email']}").click
+        assert(page.has_link?("notifications-menu"), 'no user menu')
+        page.find("#notifications-menu").click
         within('.dropdown-menu') do
           if user['is_active']
             assert page.has_no_link?('Not active'), 'Found link - Not active'