Ignore:
Timestamp:
4 Nov 2012, 20:12:59 (12 years ago)
Author:
Henrik Bettermann
Message:

Adjust to changes made in base package.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py

    r9504 r9527  
    8585        self.app['configuration']['2004'].gown_fee = 150.0
    8686        self.app['configuration']['2004'].transfer_fee = 90.0
    87         #self.app['configuration']['2004'].clearance_fee = 120.0
    8887        self.app['configuration']['2004'].booking_fee = 150.0
    8988        self.app['configuration']['2004'].maint_fee = 180.0
     
    9291        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
    9392        self.browser.open(self.payments_path)
    94         self.browser.getControl("Add online payment ticket").click()
     93        self.browser.getLink("Add current session payment ticket").click()
    9594        self.browser.getControl("Create ticket").click()
    9695        self.assertMatches('...Wrong state...',
     
    101100        self.assertMatches('...Amount could not be determined...',
    102101                           self.browser.contents)
    103 
    104102        self.app['configuration']['2004'].school_fee_base = 6666.0
    105 
    106         self.browser.getControl("Add online payment ticket").click()
    107103        self.browser.getControl("Create ticket").click()
    108104        self.assertMatches('...ticket created...',
     
    169165                           self.browser.contents)
    170166        # Ok, then we approve the first instalment ...
     167        self.browser.open(self.payments_path)
    171168        ctrl = self.browser.getControl(name='val_id')
    172169        p_id = ctrl.options[0]
     
    204201        del self.app['configuration']['2004']
    205202        self.browser.open(self.payments_path)
    206         self.browser.getControl("Add online payment ticket").click()
     203        self.browser.getLink("Add current session payment ticket").click()
    207204        self.browser.getControl("Create ticket").click()
    208205        self.assertMatches('...Session configuration object is not...',
    209206                           self.browser.contents)
     207
     208    def test_student_payments(self):
     209        # Login
     210        IWorkflowState(self.student).setState('returning')
     211        self.browser.open(self.login_path)
     212        self.browser.getControl(name="form.login").value = self.student_id
     213        self.browser.getControl(name="form.password").value = 'spwd'
     214        self.browser.getControl("Login").click()
     215        self.browser.open(self.student_path + '/payments')
     216        self.assertTrue(
     217          'Add current session payment ticket' in self.browser.contents)
     218        self.assertFalse(
     219          'Add previous session payment ticket' in self.browser.contents)
     220        return
    210221
    211222    def test_get_returning_data(self):
Note: See TracChangeset for help on using the changeset viewer.