[ARVADOS] updated: fc8a283968b08b152d57a24d2c5711c876a3b379
git at public.curoverse.com
git at public.curoverse.com
Tue Jul 28 15:52:43 EDT 2015
Summary of changes:
.../test/integration/application_layout_test.rb | 25 ---------
.../test/integration/user_manage_account_test.rb | 61 +++++++++++++++++++---
.../test/integration/user_profile_test.rb | 5 +-
services/api/test/fixtures/users.yml | 1 +
4 files changed, 58 insertions(+), 34 deletions(-)
via fc8a283968b08b152d57a24d2c5711c876a3b379 (commit)
from da56d26d09a6b315bdb93aed4473310b939e1bd7 (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 fc8a283968b08b152d57a24d2c5711c876a3b379
Author: Manoj <jonam33 at gmail.com>
Date: Tue Jul 28 15:51:59 2015 -0400
6588: Added tests for new pages and modified existing tests to not use
manage account page.
diff --git a/apps/workbench/test/integration/application_layout_test.rb b/apps/workbench/test/integration/application_layout_test.rb
index d9472d8..31a297f 100644
--- a/apps/workbench/test/integration/application_layout_test.rb
+++ b/apps/workbench/test/integration/application_layout_test.rb
@@ -240,29 +240,4 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
assert page.has_text? look_for
end
end
-
- [
- ['My Virtual Machines', nil, 'Host name'],
- ['My Repositories', 'Add new repository', 'It may take a minute or two before you can clone your new repository.'],
- ['My SSH Keys', 'Add new SSH key', 'Click here to learn about SSH keys in Arvados.'],
- ['My Current Token', nil, 'HISTIGNORE=$HISTIGNORE'],
- ].each do |page_name, button_name, look_for|
- test "test notification menu for page #{page_name}" do
- visit page_with_token('admin')
- within('.navbar-fixed-top') do
- page.find("#notifications-menu").click
- within('.dropdown-menu') do
- assert_selector 'a', text: page_name
- find('a', text: page_name).click
- end
- end
-
- if button_name
- assert_selector 'a', text: button_name
- find('a', text: button_name).click
- end
-
- assert page.has_text? look_for
- end
- end
end
diff --git a/apps/workbench/test/integration/user_manage_account_test.rb b/apps/workbench/test/integration/user_manage_account_test.rb
index cc28b27..3f9a554 100644
--- a/apps/workbench/test/integration/user_manage_account_test.rb
+++ b/apps/workbench/test/integration/user_manage_account_test.rb
@@ -11,16 +11,16 @@ class UserManageAccountTest < ActionDispatch::IntegrationTest
within('.navbar-fixed-top') do
page.find("#notifications-menu").click
within('.dropdown-menu') do
- find('a', text: 'Manage account').click
+ assert_selector 'a', text: 'My Virtual Machines'
+ assert_selector 'a', text: 'My Repositories'
+ assert_selector 'a', text: 'My Current Token'
+ assert_selector 'a', text: 'My SSH Keys'
+ find('a', text: 'My SSH Keys').click
end
end
- # now in manage account page
- assert page.has_text?('Virtual Machines'), 'No text - Virtual Machines'
- assert page.has_text?('Repositories'), 'No text - Repositories'
- assert page.has_text?('SSH Keys'), 'No text - SSH Keys'
- assert page.has_text?('Current Token'), 'No text - Current Token'
- assert page.has_text?('The Arvados API token is a secret key that enables the Arvados SDKs to access Arvados'), 'No text - Arvados API token'
+ # now in My SSH Keys page
+ assert page.has_text?('Add new SSH key'), 'No text - Add SSH key'
add_and_verify_ssh_key
else # inactive user
within('.navbar-fixed-top') do
@@ -164,7 +164,7 @@ class UserManageAccountTest < ActionDispatch::IntegrationTest
within('.navbar-fixed-top') do
page.find("#notifications-menu").click
within('.dropdown-menu') do
- find('a', text: 'Manage account').click
+ find('a', text: 'My Virtual Machines').click
end
end
assert_text 'You do not have access to any virtual machines.'
@@ -183,4 +183,49 @@ class UserManageAccountTest < ActionDispatch::IntegrationTest
assert_match /git at git.*:active\/workbenchtest.git/, page.text
assert_match /https:\/\/git.*\/active\/workbenchtest.git/, page.text
end
+
+ [
+ ['My Virtual Machines', nil, 'Host name'],
+ ['My Repositories', 'Add new repository', 'It may take a minute or two before you can clone your new repository.'],
+ ['My Current Token', nil, 'HISTIGNORE=$HISTIGNORE'],
+ ['My SSH Keys', 'Add new SSH key', 'Click here to learn about SSH keys in Arvados.'],
+ ].each do |page_name, button_name, look_for|
+ test "test notification menu for page #{page_name}" do
+ visit page_with_token('admin')
+ within('.navbar-fixed-top') do
+ page.find("#notifications-menu").click
+ within('.dropdown-menu') do
+ assert_selector 'a', text: page_name
+ find('a', text: page_name).click
+ end
+ end
+
+ if button_name
+ assert_selector 'a', text: button_name
+ find('a', text: button_name).click
+ end
+
+ assert page.has_text? look_for
+ end
+ end
+
+ [
+ ['My Virtual Machines', 'You do not have access to any virtual machines.'],
+ ['My Repositories', 'You do not seem to have access to any repositories.'],
+ ['My Current Token', 'HISTIGNORE=$HISTIGNORE'],
+ ['My SSH Keys', 'You have not yet set up an SSH public key for use with Arvados.'],
+ ].each do |page_name, look_for|
+ test "test notification menu for page #{page_name} when page is empty" do
+ visit page_with_token('user1_with_load')
+ within ('.navbar-fixed-top') do
+ page.find("#notifications-menu").click
+ within('.dropdown-menu') do
+ assert_selector 'a', text: page_name
+ find('a', text: page_name).click
+ end
+ end
+
+ assert page.has_text? look_for
+ end
+ end
end
diff --git a/apps/workbench/test/integration/user_profile_test.rb b/apps/workbench/test/integration/user_profile_test.rb
index 3aac6a0..9321396 100644
--- a/apps/workbench/test/integration/user_profile_test.rb
+++ b/apps/workbench/test/integration/user_profile_test.rb
@@ -54,7 +54,10 @@ class UserProfileTest < 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 page.has_link?('Manage account'), 'No link - Manage account'
+ assert page.has_link?('My Virtual Machines'), 'No link - My Virtual Machines'
+ assert page.has_link?('My Repositories'), 'No link - My Repositories'
+ assert page.has_link?('My Current Token'), 'No link - My Current Token'
+ assert page.has_link?('My SSH Keys'), 'No link - My SSH Keys'
if profile_config
assert page.has_link?('Manage profile'), 'No link - Manage profile'
diff --git a/services/api/test/fixtures/users.yml b/services/api/test/fixtures/users.yml
index e2088db..db9607b 100644
--- a/services/api/test/fixtures/users.yml
+++ b/services/api/test/fixtures/users.yml
@@ -278,6 +278,7 @@ user1_with_load:
identity_url: https://user1_with_load.openid.local
is_active: true
is_admin: false
+ username: user1withload
prefs:
profile:
organization: example.com
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list