Changeset 14732 for main/kofacustom.dspg/trunk/src/kofacustom/dspg
- Timestamp:
- 27 Jul 2017, 05:22:28 (7 years ago)
- Location:
- main/kofacustom.dspg/trunk/src/kofacustom/dspg
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.dspg/trunk/src/kofacustom/dspg/applicants/browser.py
r14721 r14732 23 23 from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget 24 24 from zope.formlib.textwidgets import BytesDisplayWidget 25 from waeup.kofa.interfaces import IExtFileStore, IKofaUtils 25 26 from waeup.kofa.applicants.interfaces import ( 26 27 IApplicant, IApplicantEdit, ISpecialApplicant) 27 28 from waeup.kofa.applicants.browser import (ApplicantDisplayFormPage, 28 29 ApplicantManageFormPage, ApplicantEditFormPage, 29 ApplicantsContainerPage )30 ApplicantsContainerPage, ApplicationFeePaymentAddPage) 30 31 from waeup.kofa.applicants.viewlets import ( 31 32 PaymentReceiptActionButton, PDFActionButton) … … 45 46 ) 46 47 48 from kofacustom.dspg.interfaces import MessageFactory as _ 49 47 50 UG_OMIT_EDIT_FIELDS = [ 48 51 value for value in UG_OMIT_EDIT_FIELDS … … 196 199 form_fields['reg_number'].for_display = True 197 200 return form_fields 201 202 class CustomApplicationFeePaymentAddPage(ApplicationFeePaymentAddPage): 203 """ Page to add an online payment ticket 204 """ 205 206 @property 207 def custom_requirements(self): 208 store = getUtility(IExtFileStore) 209 if not store.getFileByContext(self.context, attr=u'passport.jpg'): 210 return _('Upload your passport photo before making payment.') 211 return '' -
main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch/tests.py
r14716 r14732 30 30 # do exist really and are not bothered by being spammed by a test programme. 31 31 EXTERNAL_TESTS = False 32 33 SAMPLE_IMAGE = os.path.join(os.path.dirname(__file__), 'test_image.jpg') 32 34 33 35 def external_test(func): … … 217 219 self.browser.getControl("Save").click() 218 220 self.browser.getControl("Add online").click() 221 self.assertMatches('...passport photo before making payment...', 222 self.browser.contents) 223 self.browser.open(self.manage_path) 224 super(InterswitchTestsApplicants, self).fill_correct_values() 225 self.browser.getControl(name="form.nationality").value = ['NG'] 226 #self.browser.getControl(name="transition").value = ['start'] 227 image = open(SAMPLE_IMAGE, 'rb') 228 ctrl = self.browser.getControl(name='form.passport') 229 file_ctrl = ctrl.mech_control 230 file_ctrl.add_file(image, filename='myphoto.jpg') 231 self.browser.getControl("Save").click() 232 self.browser.getControl("Add online").click() 219 233 self.assertMatches('...ticket created...', 220 234 self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.