6588: Changed settings menu to user settings menu and changed text if account is...
authorManoj <jonam33@gmail.com>
Wed, 5 Aug 2015 16:24:16 +0000 (12:24 -0400)
committerManoj <jonam33@gmail.com>
Wed, 5 Aug 2015 16:24:16 +0000 (12:24 -0400)
apps/workbench/app/views/layouts/body.html.erb
apps/workbench/test/integration/user_settings_menu_test.rb
services/api/app/views/user_notifier/account_is_setup.text.erb
services/api/test/functional/arvados/v1/users_controller_test.rb

index c4594941dabfe4b9c21dddaf7806e0b13b45a3ca..61b0a1cb4089180b6eae34cee21a55869ddbd185 100644 (file)
@@ -59,7 +59,7 @@
 
                 <li role="menuitem">
                   <%= link_to virtual_machines_user_path(current_user), role: 'menu-item' do %>
-                    <i class="fa fa-lg fa-code-fork fa-fw"></i> Virtual machines
+                    <i class="fa fa-lg fa-terminal fa-fw"></i> Virtual machines
                   <% end %>
                 </li>
                 <li role="menuitem">
index 57f62d585631f97163201347bccd3c20aa6db98f..f6a0ce722fa4c2282037d551b117c6f75a4243eb 100644 (file)
@@ -5,8 +5,8 @@ class UserSettingsMenuTest < ActionDispatch::IntegrationTest
     need_javascript
   end
 
-  # test ssh_keys page
-  def verify_settings_menu user
+  # test user settings menu
+  def verify_user_settings_menu user
     if user['is_active']
       within('.navbar-fixed-top') do
         page.find("#notifications-menu").click
@@ -66,9 +66,9 @@ class UserSettingsMenuTest < ActionDispatch::IntegrationTest
     ['active', api_fixture('users')['active']],
     ['admin', api_fixture('users')['admin']],
   ].each do |token, user|
-    test "test settings menu for user #{token}" do
+    test "test user settings menu for user #{token}" do
       visit page_with_token(token)
-      verify_settings_menu user
+      verify_user_settings_menu user
     end
   end
 
@@ -84,7 +84,7 @@ class UserSettingsMenuTest < ActionDispatch::IntegrationTest
     ['job_reader', :ssh, :pipeline],
     ['active'],
   ].each do |user, *expect|
-    test "settings menu for #{user} with notifications #{expect.inspect}" do
+    test "user settings menu for #{user} with notifications #{expect.inspect}" do
       Rails.configuration.anonymous_user_token = false
       visit page_with_token(user)
       click_link 'notifications-menu'
@@ -197,7 +197,7 @@ class UserSettingsMenuTest < ActionDispatch::IntegrationTest
     ['/current_token', nil, 'HISTIGNORE=$HISTIGNORE', 'ARVADOS_API_TOKEN=3kg6k6lzmp9kj5'],
     ['ssh_keys', 'Add new SSH key', 'Click here to learn about SSH keys in Arvados.', 'active'],
   ].each do |page_name, button_name, look_for, content|
-    test "test user-settings menu for page #{page_name}" do
+    test "test user settings menu for page #{page_name}" do
       if page_name == '/current_token'
         visit page_with_token('active', page_name)
       else
@@ -220,7 +220,7 @@ class UserSettingsMenuTest < ActionDispatch::IntegrationTest
     ['/current_token', 'HISTIGNORE=$HISTIGNORE'],
     ['ssh_keys', 'You have not yet set up an SSH public key for use with Arvados.'],
   ].each do |page_name, look_for|
-    test "test user-settings menu for page #{page_name} when page is empty" do
+    test "test user settings menu for page #{page_name} when page is empty" do
       if page_name == '/current_token'
         visit page_with_token('user1_with_load', page_name)
       else
index 8f9e05869d1b4d0e2fd9f6ac5a608cad128edda0..2500bf13c20deeed19c30207e51eeef2c04cb0a4 100644 (file)
@@ -6,7 +6,7 @@ Hi there,
 
 Your Arvados shell account has been set up. Please visit the virtual machines page <% if Rails.configuration.workbench_address %>at
 
-  <%= Rails.configuration.workbench_address %>users/<%= @user.uuid%>/virtual_machines <% else %><% end %>
+  <%= Rails.configuration.workbench_address %><%= "/" if !Rails.configuration.workbench_address.end_with?("/") %>users/<%= @user.uuid%>/virtual_machines <% else %><% end %>
 
 for connection instructions.
 
index 62ed8789fa8ce541d7976bf48bc4bc33ffdb8980..157e487859c927a978baad10c810592e36be9e77 100644 (file)
@@ -656,10 +656,7 @@ class Arvados::V1::UsersControllerTest < ActionController::TestCase
     assert_equal 'Welcome to Curoverse - shell account enabled', setup_email.subject
     assert (setup_email.body.to_s.include? 'Your Arvados shell account has been set up'),
         'Expected Your Arvados shell account has been set up in email body'
-    assert (setup_email.body.to_s.include? '/virtual_machines'),
-        'Expected /virtual_machines link to appear in email body'
-    assert (setup_email.body.to_s.include? Rails.configuration.workbench_address),
-        'Expected workbench url in email body'
+    assert (setup_email.body.to_s.include? "#{Rails.configuration.workbench_address}users/#{created['uuid']}/virtual_machines"), 'Expected virtual machines url in email body'
   end
 
   test "non-admin user can get basic information about readable users" do