Ignore:
Timestamp:
7 Jul 2014, 06:35:58 (11 years ago)
Author:
Henrik Bettermann
Message:

Use lastname (surname) instead of firstname to verify found application record on ApplicantRegistrationPage?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py

    r11729 r11738  
    12101210        self.applicantscontainer.mode = 'update'
    12111211        self.browser.open(self.container_path + '/register')
    1212         self.browser.getControl(name="form.firstname").value = 'John'
     1212        self.browser.getControl(name="form.lastname").value = 'Better'
    12131213        self.browser.getControl(name="form.reg_number").value = 'anynumber'
    12141214        self.browser.getControl(name="form.email").value = 'xx@yy.zz'
     
    12171217            in self.browser.contents)
    12181218        # Even with the correct reg_number we can't register
    1219         # because firstname attribute is not set.
     1219        # because lastname attribute is not set.
    12201220        self.applicantscontainer.mode = 'update'
    12211221        self.browser.open(self.container_path + '/register')
    1222         self.browser.getControl(name="form.firstname").value = 'John'
     1222        self.browser.getControl(name="form.lastname").value = 'Better'
    12231223        self.browser.getControl(name="form.reg_number").value = '1234'
    12241224        self.browser.getControl(name="form.email").value = 'xx@yy.zz'
     
    12271227        # Let's set this attribute manually
    12281228        # and try to register with a wrong name.
    1229         self.applicant.firstname = u'John'
     1229        self.applicant.lastname = u'Better'
    12301230        self.browser.open(self.container_path + '/register')
    1231         self.browser.getControl(name="form.firstname").value = 'Johnny'
     1231        self.browser.getControl(name="form.lastname").value = 'Worse'
    12321232        self.browser.getControl(name="form.reg_number").value = '1234'
    12331233        self.browser.getControl(name="form.email").value = 'xx@yy.zz'
    12341234        self.browser.getControl("Send login credentials").click()
    1235         # Anonymous is not informed that firstname verification failed.
     1235        # Anonymous is not informed that lastname verification failed.
    12361236        # It seems that the record doesn't exist.
    12371237        self.assertTrue('No application record found.'
    12381238            in self.browser.contents)
    1239         # Even with the correct firstname we can't register if a
     1239        # Even with the correct lastname we can't register if a
    12401240        # password has been set and used.
    12411241        IWorkflowState(self.applicant).setState('started')
    1242         self.browser.getControl(name="form.firstname").value = 'John'
     1242        self.browser.getControl(name="form.lastname").value = 'Better'
    12431243        self.browser.getControl(name="form.reg_number").value = '1234'
    12441244        self.browser.getControl("Send login credentials").click()
     
    12521252        IWorkflowState(self.applicant).setState('initialized')
    12531253        self.browser.open(self.container_path + '/register')
    1254         # The firstname field, used for verification, is not case-sensitive.
    1255         self.browser.getControl(name="form.firstname").value = 'jOhn'
     1254        # The lastname field, used for verification, is not case-sensitive.
     1255        self.browser.getControl(name="form.lastname").value = 'bEtter'
    12561256        self.browser.getControl(name="form.reg_number").value = '1234'
    12571257        self.browser.getControl(name="form.email").value = 'new@yy.zz'
Note: See TracChangeset for help on using the changeset viewer.