Changeset 13363 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 30 Oct 2015, 08:09:05 (9 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r13356 r13363 1323 1323 # No need to flash something. 1324 1324 return 1325 applicant_id = form.get('applicant_id', None)1325 unique_id = form.get('unique_id', None) 1326 1326 lastname = form.get('lastname', None) 1327 if not applicant_id or not lastname:1327 if not unique_id or not lastname: 1328 1328 self.flash( 1329 1329 _('Required input missing.'), type='warning') … … 1331 1331 cat = getUtility(ICatalog, name='applicants_catalog') 1332 1332 results = list( 1333 cat.searchResults(applicant_id=(applicant_id, applicant_id))) 1333 cat.searchResults(applicant_id=(unique_id, unique_id))) 1334 if not results: 1335 results = list( 1336 cat.searchResults(reg_number=(unique_id, unique_id))) 1334 1337 if results: 1335 1338 applicant = results[0] -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantcheckstatus.pt
r13358 r13363 4 4 <tr> 5 5 <td i18n:translate="" class="fieldname"> 6 Applicant Id:6 Registration Number or Applicant Id: 7 7 </td> 8 8 <td> 9 <input class="textType half" type="text" name=" applicant_id" />9 <input class="textType half" type="text" name="unique_id" /> 10 10 </td> 11 11 </tr> -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r13282 r13363 1388 1388 self.applicant.lastname = u'Lion ' 1389 1389 self.browser.open('http://localhost/app/applicants/checkstatus') 1390 self.browser.getControl(name=" applicant_id").value = 'nonsense'1390 self.browser.getControl(name="unique_id").value = 'nonsense' 1391 1391 self.browser.getControl(name="lastname").value = 'Lion' 1392 1392 self.browser.getControl("Submit").click() 1393 1393 self.assertTrue('No application record found' in self.browser.contents) 1394 self.browser.getControl(name=" applicant_id").value = self.applicant.applicant_id1394 self.browser.getControl(name="unique_id").value = self.applicant.applicant_id 1395 1395 self.browser.getControl(name="lastname").value = 'nonsense' 1396 1396 self.browser.getControl("Submit").click() 1397 1397 self.assertTrue('No application record found' in self.browser.contents) 1398 self.browser.getControl(name=" applicant_id").value = self.applicant.applicant_id1398 self.browser.getControl(name="unique_id").value = self.applicant.applicant_id 1399 1399 self.browser.getControl(name="lastname").value = 'Lion' 1400 1400 self.browser.getControl("Submit").click() … … 1403 1403 IWorkflowState(self.applicant).setState('admitted') 1404 1404 self.browser.open('http://localhost/app/applicants/checkstatus') 1405 self.browser.getControl(name=" applicant_id").value = self.applicant.applicant_id1405 self.browser.getControl(name="unique_id").value = self.applicant.applicant_id 1406 1406 # whitespaces are ignored 1407 1407 self.browser.getControl(name="lastname").value = 'Lion' … … 1411 1411 self.applicant.course_admitted = self.certificate 1412 1412 self.browser.open('http://localhost/app/applicants/checkstatus') 1413 self.browser.getControl(name="applicant_id").value = self.applicant.applicant_id 1413 self.browser.getControl(name="unique_id").value = self.applicant.applicant_id 1414 self.browser.getControl(name="lastname").value = 'Lion' 1415 self.browser.getControl("Submit").click() 1416 self.assertTrue('Congratulations!' in self.browser.contents) 1417 self.assertTrue('Unnamed Certificate (CERT1)' in self.browser.contents) 1418 self.assertTrue('Department of Unnamed Department (dep1)' in self.browser.contents) 1419 self.assertTrue('Faculty of Unnamed Faculty (NA)' in self.browser.contents) 1420 # also the reg_number can be used 1421 self.browser.open('http://localhost/app/applicants/checkstatus') 1422 self.browser.getControl(name="unique_id").value = self.applicant.reg_number 1414 1423 self.browser.getControl(name="lastname").value = 'Lion' 1415 1424 self.browser.getControl("Submit").click()
Note: See TracChangeset for help on using the changeset viewer.