[ARVADOS] updated: 8f93d1332a25d29aa96211920e1b399a1e94482c

git at public.curoverse.com git at public.curoverse.com
Tue Aug 4 10:34:42 EDT 2015


Summary of changes:
 .../test/integration/application_layout_test.rb    | 16 ++++-----
 .../test/integration/user_manage_account_test.rb   | 39 +++++++---------------
 2 files changed, 20 insertions(+), 35 deletions(-)

       via  8f93d1332a25d29aa96211920e1b399a1e94482c (commit)
      from  a789f895a5cdbc2a548787f99197f9861521106b (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 8f93d1332a25d29aa96211920e1b399a1e94482c
Author: Manoj <jonam33 at gmail.com>
Date:   Tue Aug 4 10:33:53 2015 -0400

    6588: Formatted tests and changed others to be more efficient.

diff --git a/apps/workbench/test/integration/application_layout_test.rb b/apps/workbench/test/integration/application_layout_test.rb
index 28e43b3..f5ce694 100644
--- a/apps/workbench/test/integration/application_layout_test.rb
+++ b/apps/workbench/test/integration/application_layout_test.rb
@@ -50,24 +50,24 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
             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'
-            assert page.has_link?('Virtual machines'), 'No link - Virtual machines'
-            assert page.has_link?('Repositories'), 'No link - Repositories'
-            assert page.has_link?('Current token'), 'No link - Current token'
-            assert page.has_link?('SSH keys'), 'No link - SSH keys'
+            assert_selector "a[href=\"/users/#{user['uuid']}/virtual_machines\"]", text: 'Virtual machines'
+            assert_selector "a[href=\"/users/#{user['uuid']}/repositories\"]", text: 'Repositories'
+            assert_selector "a[href=\"/current_token\"]", text: 'Current token'
+            assert_selector "a[href=\"/users/#{user['uuid']}/ssh_keys\"]", text: 'SSH keys'
+            assert_selector "a[href=\"/users/#{user['uuid']}/manage_account\"]", text: 'Manage account'
 
             if profile_config
-              assert page.has_link?('Manage profile'), 'No link - Manage profile'
+              assert_selector "a[href=\"/users/#{user['uuid']}/profile\"]", text: 'Manage profile'
             else
-              assert page.has_no_link?('Manage profile'), 'Found link - Manage profile'
+              assert_no_selector "a[href=\"/users/#{user['uuid']}/profile\"]", text: '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?('Virtual machines'), 'Found link - Virtual machines'
             assert page.has_no_link?('Repositories'), 'Found link - Repositories'
             assert page.has_no_link?('Current token'), 'Found link - Current token'
             assert page.has_no_link?('SSH keys'), 'Found link - SSH keys'
+            assert page.has_no_link?('Manage account'), 'Found link - Manage account'
             assert page.has_no_link?('Manage profile'), 'Found link - Manage profile'
           end
           assert page.has_link?('Log out'), 'No link - Log out'
diff --git a/apps/workbench/test/integration/user_manage_account_test.rb b/apps/workbench/test/integration/user_manage_account_test.rb
index 94a372e..7a6f930 100644
--- a/apps/workbench/test/integration/user_manage_account_test.rb
+++ b/apps/workbench/test/integration/user_manage_account_test.rb
@@ -110,15 +110,7 @@ class UserManageAccountTest < ActionDispatch::IntegrationTest
   end
 
   test "verify repositories for active user" do
-    visit page_with_token('active')
-    within('.navbar-fixed-top') do
-        page.find("#notifications-menu").click
-        within('.dropdown-menu') do
-          assert_selector 'a', text: 'Repositories'
-          find('a', text: 'Repositories').click
-        end
-    end
-
+    visit page_with_token('active',"/users/zzzzz-tpzed-xurymjxw79nv3jz/repositories")
     repos = [[api_fixture('repositories')['foo'], true, true],
              [api_fixture('repositories')['repository3'], false, false],
              [api_fixture('repositories')['repository4'], true, false]]
@@ -143,14 +135,7 @@ class UserManageAccountTest < ActionDispatch::IntegrationTest
 
   test "request shell access" do
     ActionMailer::Base.deliveries = []
-    visit page_with_token('spectator')
-    within('.navbar-fixed-top') do
-        page.find("#notifications-menu").click
-        within('.dropdown-menu') do
-          assert_selector 'a', text: 'Virtual machines'
-          find('a', text: 'Virtual machines').click
-        end
-    end
+    visit page_with_token('spectator', "/users/zzzzz-tpzed-l1s2piq4t4mps8r/virtual_machines")
     assert_text 'You do not have access to any virtual machines'
     click_link 'Send request for shell access'
 
@@ -189,11 +174,11 @@ class UserManageAccountTest < ActionDispatch::IntegrationTest
   test "create new repository" do
     visit page_with_token("active_trustedclient")
     within('.navbar-fixed-top') do
-        page.find("#notifications-menu").click
-        within('.dropdown-menu') do
-          assert_selector 'a', text: 'Repositories'
-          find('a', text: 'Repositories').click
-        end
+      page.find("#notifications-menu").click
+      within('.dropdown-menu') do
+        assert_selector 'a', text: 'Repositories'
+        find('a', text: 'Repositories').click
+      end
     end
     click_on "Add new repository"
     within ".modal-dialog" do
@@ -214,11 +199,11 @@ class UserManageAccountTest < ActionDispatch::IntegrationTest
     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
+        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

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list