- Timestamp:
- 31 Oct 2016, 07:02:58 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r14243 r14244 453 453 self.student['accommodation'].addBedTicket(bedticket) 454 454 455 def test_ student_payments(self):455 def test_maintenance_fee_payment(self): 456 456 self.certificate.study_mode = 'ug_ft' 457 457 self.student['studycourse'].entry_session = 2013 458 self.student.nationality = u'NG' 459 IWorkflowState(self.student).setState('cleared') 460 self.browser.open(self.login_path) 461 self.browser.getControl(name="form.login").value = self.student_id 462 self.browser.getControl(name="form.password").value = 'spwd' 463 self.browser.getControl("Login").click() 464 self.browser.open(self.student_path + '/payments') 465 self.browser.getLink("Add current session payment ticket").click() 466 self.browser.getControl(name="form.p_category").value = ['hostel_maintenance'] 467 self.browser.getControl("Create ticket").click() 468 self.assertTrue('ticket created' in self.browser.contents) 469 value = self.student['payments'].keys()[0] 470 self.browser.getLink(value).click() 471 self.assertTrue('<span>My bed coordinates</span>' in self.browser.contents) 472 self.assertEqual(self.student['payments'][value].amount_auth, 876.0) 473 return 474 475 def test_student_schoolfee_payments(self): 476 configuration_1 = createObject('waeup.SessionConfiguration') 477 configuration_1.academic_session = 2016 478 self.app['configuration'].addSessionConfiguration(configuration_1) 479 self.certificate.study_mode = 'ug_ft' 480 self.student['studycourse'].entry_session = 2016 481 self.student['studycourse'].current_session = 2016 482 self.student['studycourse'].entry_mode = 'ug_ft' 458 483 self.student['studycourse'].certificate.school_fee_1 = 50250.0 459 self.app['configuration']['2004'].union_fee = 1250.0 460 self.app['configuration']['2004'].welfare_fee = 750.0 484 self.app['configuration']['2016'].union_fee = 1250.0 485 self.app['configuration']['2016'].welfare_fee = 750.0 486 self.app['configuration']['2016'].id_card_fee = 350.0 461 487 self.student.nationality = u'NG' 462 488 # Login … … 475 501 self.browser.getLink(value).click() 476 502 self.assertTrue('Amount Authorized' in self.browser.contents) 477 self.assertEqual(self.student['payments'][value].amount_auth, 51750.0) 503 # 50250 + 1000 + 500 + 100 = 51850 504 self.assertEqual(self.student['payments'][value].amount_auth, 51850.0) 478 505 self.browser.open(self.browser.url + '/payment_slip.pdf') 479 506 self.assertEqual(self.browser.headers['Status'], '200 Ok') … … 489 516 self.browser.getControl("Create ticket").click() 490 517 self.assertTrue( 491 'You must chose a payment which includes additional fees' 492 in self.browser.contents) 493 #self.assertTrue( 494 # 'Another school fee payment for this session has already been made' 495 # in self.browser.contents) 496 # Test hostel maintenance payments 497 self.browser.open(self.student_path + '/payments') 498 self.browser.getLink("Add current session payment ticket").click() 499 self.browser.getControl(name="form.p_category").value = ['hostel_maintenance'] 500 self.browser.getControl("Create ticket").click() 501 self.assertTrue('ticket created' in self.browser.contents) 502 value = self.student['payments'].keys()[1] 503 self.browser.getLink(value).click() 504 self.assertTrue('<span>My bed coordinates</span>' in self.browser.contents) 505 self.assertEqual(self.student['payments'][value].amount_auth, 876.0) 518 'You must choose a payment which includes additional fees' 519 in self.browser.contents) 506 520 return 507 521
Note: See TracChangeset for help on using the changeset viewer.