Ignore:
Timestamp:
15 Nov 2016, 09:12:51 (8 years ago)
Author:
Henrik Bettermann
Message:

Add provisionally_cleared field an allow students to edit
their clearance data if set.

Location:
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/tests/test_browser.py

    r13856 r14274  
    454454        print "Sample PDF fee_payment_history.pdf written to %s" % path
    455455        return
     456
     457    def test_provisionally_cleared(self):
     458        # Students can edit clearance data
     459        IWorkflowState(self.student).setState('school fee paid')
     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        # Student can't access the clearance form
     465        self.browser.open(self.student_path)
     466        self.browser.getLink("Clearance Data").click()
     467        # Student can't open clearance edit form before starting clearance
     468        self.browser.open(self.student_path + '/cedit')
     469        self.assertMatches('...The requested form is locked...',
     470                           self.browser.contents)
     471        self.assertFalse(
     472            '<h1 class="kofa-content-label">Edit clearance data</h1>'
     473            in self.browser.contents)
     474        # If provisionally_cleared is set they can
     475        self.student.provisionally_cleared = True
     476        self.browser.getLink("Clearance Data").click()
     477        self.browser.getLink("Edit").click()
     478        self.assertTrue(
     479            '<h1 class="kofa-content-label">Edit clearance data</h1>'
     480            in self.browser.contents)
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/tests/test_export.py

    r13712 r14274  
    7878            'next_kin_address,next_kin_name,next_kin_phone,next_kin_relation,'
    7979            'nysc_lga,nysc_location,nysc_year,officer_comment,'
    80             'perm_address,personal_updated,phone,physical_clearance_date,reg_number,'
     80            'perm_address,personal_updated,phone,physical_clearance_date,'
     81            'provisionally_cleared,reg_number,'
    8182            'religion,scd_sit_date,scd_sit_fname,scd_sit_no,'
    8283            'scd_sit_results,scd_sit_type,sex,student_id,'
     
    8687            'anna@sample.com,,,,,,,,,,,,,Anna,,,,,,"[(\'accounts\', \'A\')]"'
    8788            ',,,,,,,,,,,,,,,,Tester,,,234,M.,NG,,,,,,,,,'
    88             '"Studentroad 21\nLagos 123456\n",,+234-123-12345#,,123,,,,,'
     89            '"Studentroad 21\nLagos 123456\n",,+234-123-12345#,,,123,,,,,'
    8990            '"[(\'accounts\', \'A\')]",,f,A111111,0,,,created,'
    9091            '[u\'2012-11-06 13:16:41 WAT - Record created by system\'],'
Note: See TracChangeset for help on using the changeset viewer.