Ignore:
Timestamp:
18 Jun 2018, 08:05:20 (7 years ago)
Author:
Henrik Bettermann
Message:

Break up school fee into 4 items. 'ict_entre', 'logbook_combo' and 'siwess_combo' fees must be paid before 'schoolfee'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/interswitch/tests.py

    r15041 r15056  
    6161        self.browser.getControl(name="form.p_category").value = ['schoolfee']
    6262        self.browser.getControl("Create ticket").click()
     63        self.assertTrue(
     64            'Pay SIWES, Logbook and ICT fees first.' in self.browser.contents)
     65
     66        # Add required payments first.
     67        payment = createObject('waeup.StudentOnlinePayment')
     68        payment.p_state = 'paid'
     69        payment.p_category = 'ict_entre'
     70        payment.p_id = '123'
     71        payment.p_session = 2004
     72        self.student['payments']['123'] = payment
     73        payment = createObject('waeup.StudentOnlinePayment')
     74        payment.p_state = 'paid'
     75        payment.p_category = 'logbook_combo'
     76        payment.p_id = '123'
     77        payment.p_session = 2004
     78        self.student['payments']['234'] = payment
     79        payment = createObject('waeup.StudentOnlinePayment')
     80        payment.p_state = 'paid'
     81        payment.p_category = 'siwess_combo'
     82        payment.p_id = '123'
     83        payment.p_session = 2004
     84        self.student['payments']['345'] = payment
     85
     86        self.browser.open(self.payments_path + '/addop')
     87        self.browser.getControl(name="form.p_category").value = ['schoolfee']
     88        self.browser.getControl("Create ticket").click()
    6389        self.assertMatches('...ticket created...',
    6490                           self.browser.contents)
    6591        ctrl = self.browser.getControl(name='val_id')
    66         self.value = ctrl.options[0]
     92        self.value = ctrl.options[3]
    6793        self.browser.getLink(self.value).click()
    6894        self.assertMatches('...Amount Authorized...',
     
    88114                           self.browser.contents)
    89115        ctrl = self.browser.getControl(name='val_id')
    90         self.value = ctrl.options[1]
     116        self.value = ctrl.options[4]
    91117        self.browser.getLink(self.value).click()
    92118        self.assertTrue(
Note: See TracChangeset for help on using the changeset viewer.