[ARVADOS] updated: b4309a917dc31e993e147df6ef778e283496acc2

git at public.curoverse.com git at public.curoverse.com
Tue Jun 24 12:49:22 EDT 2014


Summary of changes:
 .../test/integration/anonymous_user_test.rb        | 37 +++++++++++++++-------
 1 file changed, 25 insertions(+), 12 deletions(-)

       via  b4309a917dc31e993e147df6ef778e283496acc2 (commit)
      from  8d40a99f977c616499f49b5152308875bec1c59c (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 b4309a917dc31e993e147df6ef778e283496acc2
Author: radhika <radhika at curoverse.com>
Date:   Tue Jun 24 12:48:46 2014 -0400

    2659: add test assertions for logout action

diff --git a/apps/workbench/test/integration/anonymous_user_test.rb b/apps/workbench/test/integration/anonymous_user_test.rb
index 8c16073..b9e5b6e 100644
--- a/apps/workbench/test/integration/anonymous_user_test.rb
+++ b/apps/workbench/test/integration/anonymous_user_test.rb
@@ -116,6 +116,21 @@ class AnonymousUserTest < ActionDispatch::IntegrationTest
   end
 
   def verify_homepage_anonymous_login_not_configured user, invited
+    if !user
+      assert page.has_text? 'Please log in'
+      assert page.has_text? 'The "Log in" button below will show you a Google sign-in page'
+      assert page.has_no_text? 'My projects'
+      assert page.has_link? "Log in to #{Rails.configuration.site_name}"
+    elsif user['is_active']
+      assert page.has_text? 'My projects'
+      assert page.has_text? 'Projects shared with me'
+    elsif invited
+      assert page.has_text? 'Please check the box below to indicate that you have read and accepted the user agreement'
+    else
+      assert page.has_text? 'Your account is inactive'
+    end
+
+    verify_logged_out_page = false
     within('.navbar-fixed-top') do
       assert page.has_no_text? 'You are viewing public data'
       if !user
@@ -124,28 +139,26 @@ class AnonymousUserTest < ActionDispatch::IntegrationTest
         assert page.has_link? "#{user['email']}"
         find('a', text: "#{user['email']}").click
         within('.dropdown-menu') do
-          page.has_link? ('Logout')
           if !invited
             page.has_no_link? ('Not active')
           else
             page.has_no_link? ('Sign agreements')
           end
+          page.has_link? ('Log out')
+          find('a', text: "Log out").click
+          verify_logged_out_page = true
         end
       end
     end
 
-    if !user
-      assert page.has_text? 'Please log in'
-      assert page.has_text? 'The "Log in" button below will show you a Google sign-in page'
-      assert page.has_no_text? 'My projects'
+    if verify_logged_out_page
+      assert page.has_text? 'Goodbye'
       assert page.has_link? "Log in to #{Rails.configuration.site_name}"
-    elsif user['is_active']
-      assert page.has_text? 'My projects'
-      assert page.has_text? 'Projects shared with me'
-    elsif invited
-      assert page.has_text? 'Please check the box below to indicate that you have read and accepted the user agreement'
-    else
-      assert page.has_text? 'Your account is inactive'
+      assert page.has_no_link? "Projects"
+      within('.navbar-fixed-top') do
+        assert page.has_no_text? 'You are viewing public data'
+        assert page.has_link? "Log in"
+      end
     end
   end
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list