Changeset 13365
- Timestamp:
- 31 Oct 2015, 06:25:49 (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
r13363 r13365 1368 1368 if applicant.state in (CREATED): 1369 1369 self.created = True 1370 self.student_id = applicant.student_id 1371 self.password = applicant.application_number 1370 1372 if applicant.state in (NOT_ADMITTED,): 1371 1373 self.not_admitted = True -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantcheckstatus.pt
r13363 r13365 69 69 <br /> 70 70 <p i18n:translate=""> 71 Your student record has already been created for you. Please 72 login and check your new student credentials. 71 Your student record has already been created for you. Your new 72 user name (= student id) is: <strong><span tal:replace="view/student_id">STUDENT_ID</span></strong>. 73 Your initial password is: <strong><span tal:replace="view/password">PASSWORD</span></strong>. 74 Please proceed to the <a tal:attributes="href python: view.url(layout.site, 'login')">login form</a>, 75 enter your new login credentials and change your password immediately after login. 73 76 </p> 74 77 </tal:created> -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r13363 r13365 1392 1392 self.browser.getControl("Submit").click() 1393 1393 self.assertTrue('No application record found' in self.browser.contents) 1394 self.browser.getControl(name="unique_id").value = self.applicant.applicant_id 1394 self.browser.getControl( 1395 name="unique_id").value = self.applicant.applicant_id 1395 1396 self.browser.getControl(name="lastname").value = 'nonsense' 1396 1397 self.browser.getControl("Submit").click() 1397 1398 self.assertTrue('No application record found' in self.browser.contents) 1398 self.browser.getControl(name="unique_id").value = self.applicant.applicant_id 1399 self.browser.getControl( 1400 name="unique_id").value = self.applicant.applicant_id 1399 1401 self.browser.getControl(name="lastname").value = 'Lion' 1400 1402 self.browser.getControl("Submit").click() 1401 1403 self.assertTrue('Application status of' in self.browser.contents) 1402 self.assertTrue('You have not yet submitted your application' in self.browser.contents) 1404 self.assertTrue( 1405 'You have not yet submitted your application' in self.browser.contents) 1403 1406 IWorkflowState(self.applicant).setState('admitted') 1404 1407 self.browser.open('http://localhost/app/applicants/checkstatus') 1405 self.browser.getControl(name="unique_id").value = self.applicant.applicant_id 1406 # whitespaces are ignored 1408 self.browser.getControl( 1409 name="unique_id").value = self.applicant.applicant_id 1410 # Whitespaces are ignored. 1407 1411 self.browser.getControl(name="lastname").value = 'Lion' 1408 1412 self.browser.getControl("Submit").click() … … 1411 1415 self.applicant.course_admitted = self.certificate 1412 1416 self.browser.open('http://localhost/app/applicants/checkstatus') 1413 self.browser.getControl(name="unique_id").value = self.applicant.applicant_id 1417 self.browser.getControl( 1418 name="unique_id").value = self.applicant.applicant_id 1414 1419 self.browser.getControl(name="lastname").value = 'Lion' 1415 1420 self.browser.getControl("Submit").click() 1416 1421 self.assertTrue('Congratulations!' in self.browser.contents) 1417 1422 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 1423 self.assertTrue( 1424 'Department of Unnamed Department (dep1)' in self.browser.contents) 1425 self.assertTrue( 1426 'Faculty of Unnamed Faculty (NA)' in self.browser.contents) 1427 # Also the reg_number can be used and page shows student id and password 1428 # if applicant is in state created. 1429 IWorkflowState(self.applicant).setState('created') 1430 self.applicant.student_id = u'my id' 1421 1431 self.browser.open('http://localhost/app/applicants/checkstatus') 1422 self.browser.getControl(name="unique_id").value = self.applicant.reg_number 1432 self.browser.getControl( 1433 name="unique_id").value = self.applicant.reg_number 1423 1434 self.browser.getControl(name="lastname").value = 'Lion' 1424 1435 self.browser.getControl("Submit").click() 1425 1436 self.assertTrue('Congratulations!' in self.browser.contents) 1426 1437 self.assertTrue('Unnamed Certificate (CERT1)' in self.browser.contents) 1427 self.assertTrue('Department of Unnamed Department (dep1)' in self.browser.contents) 1428 self.assertTrue('Faculty of Unnamed Faculty (NA)' in self.browser.contents) 1438 self.assertTrue('Department of Unnamed Department (dep1)' 1439 in self.browser.contents) 1440 self.assertTrue( 1441 'Faculty of Unnamed Faculty (NA)' in self.browser.contents) 1442 self.assertTrue('user name (= student id) is: <strong>my id</strong>' 1443 in self.browser.contents) 1444 self.assertTrue( 1445 'password is: <strong>%s</strong>' % self.applicant.application_number 1446 in self.browser.contents) 1447 1429 1448 1430 1449 class ApplicantsExportTests(ApplicantsFullSetup, FunctionalAsyncTestCase):
Note: See TracChangeset for help on using the changeset viewer.