Changeset 7408


Ignore:
Timestamp:
20 Dec 2011, 11:36:14 (13 years ago)
Author:
uli
Message:

Test registration with and without phone number to get a regression
test.

File:
1 edited

Legend:

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

    r7405 r7408  
    705705
    706706    def test_register_applicant(self):
     707        # An applicant can register himself.
    707708        self.browser.open(self.container_path)
    708709        self.browser.getLink("Register for application").click()
     
    711712        self.browser.getControl(name="form.lastname").value = 'Tester'
    712713        self.browser.getControl(name="form.email").value = 'xx@yy.zz'
    713         #self.browser.getControl(name="form.phone.country").value = '234'
    714         #self.browser.getControl(name="form.phone.area").value = '555'
    715         #self.browser.getControl(name="form.phone.extension").value = '6666666'
     714        self.browser.getControl(name="form.phone.country").value = '234'
     715        self.browser.getControl(name="form.phone.area").value = '555'
     716        self.browser.getControl(name="form.phone.extension").value = '6666666'
    716717        self.browser.getControl("Get login credentials").click()
    717718        self.assertEqual(self.browser.url,
    718719            self.container_path + '/registration_complete?email=xx%40yy.zz')
     720
     721    def test_register_applicant_wo_phone(self):
     722        # We don't require the phone number when registering
     723        self.browser.open(self.container_path)
     724        self.browser.getLink("Register for application").click()
     725        # Fill the edit form with suitable values
     726        self.browser.getControl(name="form.firstname").value = 'John'
     727        self.browser.getControl(name="form.lastname").value = 'Tester'
     728        self.browser.getControl(name="form.email").value = 'xx@yy.zz'
     729        self.browser.getControl("Get login credentials").click()
     730        self.assertEqual(self.browser.url,
     731            self.container_path + '/registration_complete?email=xx%40yy.zz')
     732
Note: See TracChangeset for help on using the changeset viewer.