Ignore:
Timestamp:
1 Feb 2015, 06:06:11 (10 years ago)
Author:
Henrik Bettermann
Message:

Test registration request.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py

    r12527 r12532  
    611611        return
    612612
    613     def test_customer_upload_passport(self):
     613    def test_customer_edit_upload_upload_and_request(self):
    614614        # Customer cant login if their password is not set
    615615        self.browser.open(self.login_path)
     
    619619        self.assertMatches(
    620620            '...You logged in...', self.browser.contents)
    621         # Admitted customer can upload a passport picture
     621        self.browser.getLink("Edit").click()
     622        self.browser.getControl(name="form.email").value = 'new_email@aa.ng'
     623        self.browser.getControl("Save", index=1).click()
     624        self.assertMatches('...Form has been saved...',
     625                           self.browser.contents)
     626        self.browser.getControl("Save and request registration").click()
     627        self.assertMatches('...Passport picture is missing...',
     628                           self.browser.contents)
     629        self.assertEqual(self.customer.state, 'started')
     630        # Customer must upload a passport picture
     631        self.browser.open(self.customer_path)
    622632        self.browser.getLink("Upload files").click()
    623633        ctrl = self.browser.getControl(name='passporteditupload')
     
    632642        self.browser.getControl(name="CANCEL").click()
    633643        self.assertEqual(self.browser.url, self.customer_path)
    634 
    635     def test_customer_baseedit(self):
    636         # Customers can change the password
    637         self.customer.personal_updated = datetime.utcnow()
    638         self.browser.open(self.login_path)
    639         self.browser.getControl(name="form.login").value = self.customer_id
    640         self.browser.getControl(name="form.password").value = 'cpwd'
    641         self.browser.getControl("Login").click()
    642         self.assertEqual(self.browser.url, self.customer_path)
    643         self.assertTrue('You logged in' in self.browser.contents)
    644644        self.browser.getLink("Edit").click()
    645         self.browser.getControl(name="form.email").value = 'new_email@aa.ng'
    646         self.browser.getControl("Save", index=1).click()
    647         self.assertMatches('...Form has been saved...',
     645        self.browser.getControl("Save and request registration").click()
     646        self.assertMatches('...Registration form has been submitted...',
    648647                           self.browser.contents)
     648        self.assertEqual(self.customer.state, 'requested')
    649649        # Customer can view history
    650650        self.browser.getLink("History").click()
Note: See TracChangeset for help on using the changeset viewer.