Changeset 10646 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 24 Sep 2013, 12:39:44 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r10637 r10646 1763 1763 self.assertTrue('Employer' in self.browser.contents) 1764 1764 1765 def test_find_students_in_faculties(self): 1766 # Create local students manager in faculty 1767 self.app['users'].addUser('mrmanager', 'mrmanagersecret') 1768 self.app['users']['mrmanager'].email = 'mrmanager@foo.ng' 1769 self.app['users']['mrmanager'].title = u'Volk Wagen' 1770 # Assign LocalStudentsManager role for faculty 1771 fac = self.app['faculties']['fac1'] 1772 prmlocal = IPrincipalRoleManager(fac) 1773 prmlocal.assignRoleToPrincipal( 1774 'waeup.local.LocalStudentsManager', 'mrmanager') 1775 notify(LocalRoleSetEvent( 1776 fac, 'waeup.local.LocalStudentsManager', 'mrmanager', 1777 granted=True)) 1778 # Login as manager 1779 self.browser.open(self.login_path) 1780 self.browser.getControl(name="form.login").value = 'mrmanager' 1781 self.browser.getControl(name="form.password").value = 'mrmanagersecret' 1782 self.browser.getControl("Login").click() 1783 self.assertMatches('...You logged in...', self.browser.contents) 1784 # Manager can see his roles 1785 self.browser.getLink("My Roles").click() 1786 self.assertMatches( 1787 '...<span>Students Manager</span>...', 1788 self.browser.contents) 1789 # The manager can go to his faculty 1790 self.browser.getLink( 1791 "http://localhost/app/faculties/fac1").click() 1792 # and find students 1793 self.browser.getLink("Find students").click() 1794 self.browser.getControl("Find student").click() 1795 self.assertTrue('Empty search string' in self.browser.contents) 1796 self.browser.getControl(name="searchtype").value = ['student_id'] 1797 self.browser.getControl(name="searchterm").value = self.student_id 1798 self.browser.getControl("Find student").click() 1799 self.assertTrue('Anna Tester' in self.browser.contents) 1800 1765 1801 def test_activate_deactivate_buttons(self): 1766 1802 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
Note: See TracChangeset for help on using the changeset viewer.