incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [7/7] git commit: [#7204] Added basic test of standard profile sections
Date Tue, 04 Mar 2014 16:17:22 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/3b1b9dae
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/3b1b9dae
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/3b1b9dae

Branch: refs/heads/cj/7204
Commit: 3b1b9dae6ec7cd6d763f670becfab0db536b7d41
Parents: 9cc7b0e
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Tue Mar 4 16:17:02 2014 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Tue Mar 4 16:17:02 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/3b1b9dae/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