Ignore:
Timestamp:
19 Nov 2014, 06:42:39 (10 years ago)
Author:
Henrik Bettermann
Message:

Add missing buttons.

File:
1 edited

Legend:

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

    r11978 r11986  
    555555            '...You logged in...', self.browser.contents)
    556556        # Admitted customer can upload a passport picture
    557         self.browser.open(self.customer_path + '/change_portrait')
     557        self.browser.getLink("Change portrait").click()
    558558        ctrl = self.browser.getControl(name='passportuploadedit')
    559559        file_obj = open(SAMPLE_IMAGE, 'rb')
     
    565565            'src="http://localhost/app/customers/K1000000/passport.jpg"'
    566566            in self.browser.contents)
     567
     568    def test_customer_baseedit(self):
     569        # Customers can change the password
     570        self.customer.personal_updated = datetime.utcnow()
     571        self.browser.open(self.login_path)
     572        self.browser.getControl(name="form.login").value = self.customer_id
     573        self.browser.getControl(name="form.password").value = 'spwd'
     574        self.browser.getControl("Login").click()
     575        self.assertEqual(self.browser.url, self.customer_path)
     576        self.assertTrue('You logged in' in self.browser.contents)
     577        self.browser.getLink("Edit").click()
     578        self.browser.getControl(name="form.email").value = 'new_email@aa.ng'
     579        self.browser.getControl("Save").click()
     580        self.assertMatches('...Form has been saved...',
     581                           self.browser.contents)
     582        # Customer can view history
     583        self.browser.getLink("History").click()
     584        self.assertMatches('...Customer record created by system...',
     585            self.browser.contents)
    567586
    568587    def test_customer_login(self):
Note: See TracChangeset for help on using the changeset viewer.