incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [6/6] git commit: [#7204] Added basic test of standard profile sections
Date Tue, 04 Mar 2014 18:40:47 GMT
[#7204] Added basic test of standard profile sections

Signed-off-by: Cory Johns <cjohns@slashdotmedia.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/da922725
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/da922725
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/da922725

Branch: refs/heads/cj/7204
Commit: da9227258346104037e1883ed8d27cfbf269f942
Parents: 3d9031a
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Tue Mar 4 16:17:02 2014 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Tue Mar 4 16:46:57 2014 +0000

----------------------------------------------------------------------
 Allura/allura/tests/functional/test_user_profile.py | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/da922725/Allura/allura/tests/functional/test_user_profile.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_user_profile.py b/Allura/allura/tests/functional/test_user_profile.py
index 3d1270a..a3ea741 100644
--- a/Allura/allura/tests/functional/test_user_profile.py
+++ b/Allura/allura/tests/functional/test_user_profile.py
@@ -30,7 +30,17 @@ class TestUserProfile(TestController):
     def test_profile(self):
         r = self.app.get('/u/test-admin/profile/')
         assert_equal('Test Admin',
-                r.html.find('h1', 'project_title').find('a').text)
+                     r.html.find('h1', 'project_title').find('a').text)
+        sections = set([c for s in r.html.findAll(None, 'profile-section') for c in s['class'].split()])
+        assert_in('personal-data', sections)
+        assert_in('Username:test-admin', r.html.find(None, 'personal-data').getText())
+        assert_in('projects', sections)
+        assert_in('Test Project', r.html.find(None, 'projects').getText())
+        assert_in('Last Updated:less than 1 minute ago', r.html.find(None, 'projects').getText())
+        assert_in('tools', sections)
+        assert_in('Admin', r.html.find(None, 'tools').getText())
+        assert_in('skills', sections)
+        assert_in('No skills entered', r.html.find(None, 'skills').getText())
 
     def test_wrong_profile(self):
         self.app.get('/u/no-such-user/profile/', status=404)


Mime
View raw message