[ARVADOS] updated: bdabb9aa520b598107e319e51638f899f136aff5
git at public.curoverse.com
git at public.curoverse.com
Wed Aug 5 12:24:57 EDT 2015
Summary of changes:
apps/workbench/app/views/layouts/body.html.erb | 2 +-
apps/workbench/test/integration/user_settings_menu_test.rb | 14 +++++++-------
.../api/app/views/user_notifier/account_is_setup.text.erb | 2 +-
.../test/functional/arvados/v1/users_controller_test.rb | 5 +----
4 files changed, 10 insertions(+), 13 deletions(-)
via bdabb9aa520b598107e319e51638f899f136aff5 (commit)
from 44d4d43331979c87cee5df9ff952fd80a6e9c5f8 (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 bdabb9aa520b598107e319e51638f899f136aff5
Author: Manoj <jonam33 at gmail.com>
Date: Wed Aug 5 12:24:16 2015 -0400
6588: Changed settings menu to user settings menu and changed text if account is setup.
diff --git a/apps/workbench/app/views/layouts/body.html.erb b/apps/workbench/app/views/layouts/body.html.erb
index c459494..61b0a1c 100644
--- a/apps/workbench/app/views/layouts/body.html.erb
+++ b/apps/workbench/app/views/layouts/body.html.erb
@@ -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">
diff --git a/apps/workbench/test/integration/user_settings_menu_test.rb b/apps/workbench/test/integration/user_settings_menu_test.rb
index 57f62d5..f6a0ce7 100644
--- a/apps/workbench/test/integration/user_settings_menu_test.rb
+++ b/apps/workbench/test/integration/user_settings_menu_test.rb
@@ -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
diff --git a/services/api/app/views/user_notifier/account_is_setup.text.erb b/services/api/app/views/user_notifier/account_is_setup.text.erb
index 8f9e058..2500bf1 100644
--- a/services/api/app/views/user_notifier/account_is_setup.text.erb
+++ b/services/api/app/views/user_notifier/account_is_setup.text.erb
@@ -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.
diff --git a/services/api/test/functional/arvados/v1/users_controller_test.rb b/services/api/test/functional/arvados/v1/users_controller_test.rb
index 62ed878..157e487 100644
--- a/services/api/test/functional/arvados/v1/users_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/users_controller_test.rb
@@ -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
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list