Ignore:
Timestamp:
9 Jul 2014, 05:43:16 (10 years ago)
Author:
Henrik Bettermann
Message:

Customize payment_slip_download_warning. Application payment tickets can be downloaded without submitting the form.

Location:
main/waeup.aaue/trunk/src/waeup/aaue
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/applicants/browser.py

    r11291 r11755  
    3232    NigeriaPDFApplicationSlip,
    3333    NigeriaApplicantRegistrationPage,
     34    NigeriaExportPDFPaymentSlipPage,
    3435    UG_OMIT_DISPLAY_FIELDS,
    3536    UG_OMIT_PDF_FIELDS,
     
    166167            applicant_id=applicant_id)))
    167168        return
     169
     170class CustomExportPDFPaymentSlipPage(NigeriaExportPDFPaymentSlipPage):
     171
     172    @property
     173    def payment_slip_download_warning(self):
     174        return ''
  • main/waeup.aaue/trunk/src/waeup/aaue/applicants/tests/test_browser.py

    r10929 r11755  
    1919from zope.event import notify
    2020from zope.component import createObject, getUtility
     21from waeup.kofa.configuration import SessionConfiguration
    2122from waeup.aaue.testing import FunctionalLayer
    2223from waeup.kofa.applicants.tests.test_browser import (
    23     ApplicantsFullSetup, container_name_1)
     24    ApplicantsFullSetup, container_name_1, session_1)
    2425
    2526class CustomApplicantUITest(ApplicantsFullSetup):
     
    4445        self.assertTrue('<td>Password:</td>' in self.browser.contents)
    4546        return
     47
     48    def test_payment_slip_download_warning(self):
     49        configuration = SessionConfiguration()
     50        configuration.academic_session = session_1
     51        configuration.application_fee = 200.0
     52        self.app['configuration'].addSessionConfiguration(configuration)
     53        self.login()
     54        self.browser.open(self.edit_path)
     55        self.fill_correct_values()
     56        self.browser.getControl(name="form.programme_type").value = ['regular']
     57        self.browser.getControl(name="form.nationality").value = ['NG']
     58        self.browser.getControl("Save").click()
     59        self.browser.getControl("Add online payment ticket").click()
     60        self.assertMatches('...Payment ticket created...',
     61                           self.browser.contents)
     62        # Payment tickets can be downloaded without submitting the form.
     63        self.browser.getLink("Download payment slip").click()
     64        self.assertEqual(self.browser.headers['Content-Type'],
     65                 'application/pdf')
     66        return
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_export.py

    r11546 r11755  
    105105            'r_pay_reference,thirdparty_amt,student_id,state,'
    106106            'current_session\r\n'
    107             '666,12.12,2012-04-01 13:12:01,,schoolfee,1,my-id,p-item,'
    108             '100,2012,paid,2012-04-01 14:12:01,,12.12,'
     107            '666,12.12,2012-04-01 13:12:01#,,schoolfee,1,my-id,p-item,'
     108            '100,2012,paid,2012-04-01 14:12:01#,,12.12,'
    109109            '789,r-code,interswatch,,,,A111111,created,2012\r\n',
    110110            result
Note: See TracChangeset for help on using the changeset viewer.