- Timestamp:
- 1 Feb 2015, 06:06:11 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py
r12527 r12532 611 611 return 612 612 613 def test_customer_ upload_passport(self):613 def test_customer_edit_upload_upload_and_request(self): 614 614 # Customer cant login if their password is not set 615 615 self.browser.open(self.login_path) … … 619 619 self.assertMatches( 620 620 '...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) 622 632 self.browser.getLink("Upload files").click() 623 633 ctrl = self.browser.getControl(name='passporteditupload') … … 632 642 self.browser.getControl(name="CANCEL").click() 633 643 self.assertEqual(self.browser.url, self.customer_path) 634 635 def test_customer_baseedit(self):636 # Customers can change the password637 self.customer.personal_updated = datetime.utcnow()638 self.browser.open(self.login_path)639 self.browser.getControl(name="form.login").value = self.customer_id640 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)644 644 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...', 648 647 self.browser.contents) 648 self.assertEqual(self.customer.state, 'requested') 649 649 # Customer can view history 650 650 self.browser.getLink("History").click()
Note: See TracChangeset for help on using the changeset viewer.