Changeset 8037 for main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests
- Timestamp:
- 4 Apr 2012, 06:19:20 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r8033 r8037 806 806 self.assertEqual(self.browser.url, 807 807 self.container_path + '/registration_complete?email=xx%40yy.zz') 808 # Now we change the application mode and check if applicants 808 return 809 810 def test_register_applicant_update(self): 811 # We change the application mode and check if applicants 809 812 # can find and update imported records instead of creating new records. 810 813 # First we check what happens if record can't be found. 811 814 self.applicantscontainer.mode = 'update' 812 815 self.browser.open(self.container_path + '/register') 813 #self.browser.getControl(name="form.firstname").value = 'John'816 self.browser.getControl(name="form.firstname").value = 'John' 814 817 self.browser.getControl(name="form.reg_number").value = 'anynumber' 815 818 self.browser.getControl(name="form.email").value = 'xx@yy.zz' … … 817 820 self.assertTrue('No application record found.' 818 821 in self.browser.contents) 819 # Now we checkif password has already been set.820 #self.browser.getControl(name="form.firstname").value = 'John'822 # We can't register if password has already been set. 823 self.browser.getControl(name="form.firstname").value = 'John' 821 824 self.browser.getControl(name="form.reg_number").value = '1234' 822 825 self.browser.getControl("Get login credentials").click() … … 828 831 self.applicant.application_number]).context.password = None 829 832 self.browser.open(self.container_path + '/register') 830 #self.browser.getControl(name="form.firstname").value = 'John'833 self.browser.getControl(name="form.firstname").value = 'John' 831 834 self.browser.getControl(name="form.reg_number").value = '1234' 832 835 self.browser.getControl(name="form.email").value = 'xx@yy.zz' 836 self.browser.getControl("Get login credentials").click() 837 self.assertTrue('An error occurred.'in self.browser.contents) 838 # The firstname attribute was None. Let's set this attribute manually 839 # and try to register with a wrong name. 840 self.applicant.firstname = u'John' 841 self.browser.open(self.container_path + '/register') 842 self.browser.getControl(name="form.firstname").value = 'Johnny' 843 self.browser.getControl(name="form.reg_number").value = '1234' 844 self.browser.getControl(name="form.email").value = 'xx@yy.zz' 845 self.browser.getControl("Get login credentials").click() 846 self.assertTrue('No application record found.' 847 in self.browser.contents) 848 # Now we use the correct name. For verification 849 # the name is not case-sensitive. 850 self.browser.getControl(name="form.firstname").value = 'jOhn' 833 851 self.browser.getControl("Get login credentials").click() 834 852 self.assertTrue('Your registration was successful.'
Note: See TracChangeset for help on using the changeset viewer.