[ARVADOS] updated: 36270fd64f060da69a8048d2e3ac68945977bcff

git at public.curoverse.com git at public.curoverse.com
Wed Jun 25 10:40:35 EDT 2014


Summary of changes:
 .../test/integration/application_layout_test.rb    | 43 ++++++++++++++++++++--
 1 file changed, 39 insertions(+), 4 deletions(-)

       via  36270fd64f060da69a8048d2e3ac68945977bcff (commit)
       via  1b4fe99145d8105043d393af4fdae4316e094e4a (commit)
      from  52bdb85f45b382e50d9f405e28422b5c184d3ba1 (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 36270fd64f060da69a8048d2e3ac68945977bcff
Author: radhika <radhika at curoverse.com>
Date:   Wed Jun 25 10:40:19 2014 -0400

    2659: test system menu

diff --git a/apps/workbench/test/integration/application_layout_test.rb b/apps/workbench/test/integration/application_layout_test.rb
index 48c99a7..6760d54 100644
--- a/apps/workbench/test/integration/application_layout_test.rb
+++ b/apps/workbench/test/integration/application_layout_test.rb
@@ -114,31 +114,7 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
       end
     end
 
-    # test the system menu
-    if user && user['is_active']
-      look_for_add_new = nil
-      within('.navbar-fixed-top') do
-        page.find("#system-menu").click
-        if user['is_admin']
-          within('.dropdown-menu') do
-            assert page.has_text? 'Groups'
-            find('a', text: 'Users').click
-            look_for_add_new = 'Add a new user'
-          end
-        else
-          within('.dropdown-menu') do
-            assert page.has_no_text? 'Users'
-            find('a', text: 'Groups').click
-            look_for_add_new = 'Add a new group'
-          end
-        end
-      end
-      if look_for_add_new
-        assert page.has_text? look_for_add_new
-      end
-    else
-      assert page.has_no_link? '#system-menu'
-    end
+    check_system_menu user
   end
 
   def verify_homepage_anonymous_login_not_configured user, invited
@@ -174,7 +150,11 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
       end
     end
 
-    # test the system menu
+    check_system_menu user
+  end
+
+  # test the system menu
+  def check_system_menu user
     if user && user['is_active']
       look_for_add_new = nil
       within('.navbar-fixed-top') do

commit 1b4fe99145d8105043d393af4fdae4316e094e4a
Author: radhika <radhika at curoverse.com>
Date:   Wed Jun 25 10:33:24 2014 -0400

    2659: add system menu testing

diff --git a/apps/workbench/test/integration/application_layout_test.rb b/apps/workbench/test/integration/application_layout_test.rb
index bd1fa4e..48c99a7 100644
--- a/apps/workbench/test/integration/application_layout_test.rb
+++ b/apps/workbench/test/integration/application_layout_test.rb
@@ -2,7 +2,7 @@ require 'integration_helper'
 require 'selenium-webdriver'
 require 'headless'
 
-class AnonymousUserTest < ActionDispatch::IntegrationTest
+class ApplicationLayoutTest < ActionDispatch::IntegrationTest
   setup do
     headless = Headless.new
     headless.start
@@ -113,6 +113,32 @@ class AnonymousUserTest < ActionDispatch::IntegrationTest
         assert page.has_text? 'Please check the box below to indicate that you have read and accepted the user agreement'
       end
     end
+
+    # test the system menu
+    if user && user['is_active']
+      look_for_add_new = nil
+      within('.navbar-fixed-top') do
+        page.find("#system-menu").click
+        if user['is_admin']
+          within('.dropdown-menu') do
+            assert page.has_text? 'Groups'
+            find('a', text: 'Users').click
+            look_for_add_new = 'Add a new user'
+          end
+        else
+          within('.dropdown-menu') do
+            assert page.has_no_text? 'Users'
+            find('a', text: 'Groups').click
+            look_for_add_new = 'Add a new group'
+          end
+        end
+      end
+      if look_for_add_new
+        assert page.has_text? look_for_add_new
+      end
+    else
+      assert page.has_no_link? '#system-menu'
+    end
   end
 
   def verify_homepage_anonymous_login_not_configured user, invited
@@ -147,6 +173,32 @@ class AnonymousUserTest < ActionDispatch::IntegrationTest
         end
       end
     end
+
+    # test the system menu
+    if user && user['is_active']
+      look_for_add_new = nil
+      within('.navbar-fixed-top') do
+        page.find("#system-menu").click
+        if user['is_admin']
+          within('.dropdown-menu') do
+            assert page.has_text? 'Groups'
+            find('a', text: 'Users').click
+            look_for_add_new = 'Add a new user'
+          end
+        else
+          within('.dropdown-menu') do
+            assert page.has_no_text? 'Users'
+            find('a', text: 'Groups').click
+            look_for_add_new = 'Add a new group'
+          end
+        end
+      end
+      if look_for_add_new
+        assert page.has_text? look_for_add_new
+      end
+    else
+      assert page.has_no_link? '#system-menu'
+    end
   end
 
   [
@@ -154,7 +206,8 @@ class AnonymousUserTest < ActionDispatch::IntegrationTest
     ['anonymous', nil, false],
     ['inactive', api_fixture('users')['inactive'], true],
     ['inactive_uninvited', api_fixture('users')['inactive_uninvited'], false],
-    ['active', api_fixture('users')['active'], true]
+    ['active', api_fixture('users')['active'], true],
+    ['admin', api_fixture('users')['admin'], true],
   ].each do |token, user, invited|
     test "visit home page when anonymous login configured for user #{token}" do
       Rails.configuration.anonymous_user_token = api_fixture('api_client_authorizations')['anonymous']['api_token']
@@ -173,7 +226,8 @@ class AnonymousUserTest < ActionDispatch::IntegrationTest
     ['anonymous', api_fixture('users')['anonymous'], false],
     ['inactive', api_fixture('users')['inactive'], true],
     ['inactive_uninvited', api_fixture('users')['inactive_uninvited'], false],
-    ['active', api_fixture('users')['active'], true]
+    ['active', api_fixture('users')['active'], true],
+    ['admin', api_fixture('users')['admin'], true],
   ].each do |token, user, invited|
     test "visit home page when anonymous login configured with bogus token for user #{token}" do
       Rails.configuration.anonymous_user_token = 'no-such-token'
@@ -192,7 +246,8 @@ class AnonymousUserTest < ActionDispatch::IntegrationTest
     ['anonymous', api_fixture('users')['anonymous'], false],
     ['inactive', api_fixture('users')['inactive'], true],
     ['inactive_uninvited', api_fixture('users')['inactive_uninvited'], false],
-    ['active', api_fixture('users')['active'], true]
+    ['active', api_fixture('users')['active'], true],
+    ['admin', api_fixture('users')['admin'], true],
   ].each do |token, user, invited|
     test "visit home page when anonymous login not configured for user #{token}" do
       Rails.configuration.anonymous_user_token = false

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list