Ignore:
Timestamp:
8 Sep 2021, 07:15:07 (3 years ago)
Author:
Henrik Bettermann
Message:

Enable students and officers to upload scanned signature in the same
way as passport pictures are handled. Some tabs and titles had to be
renamed. The placeholder file, which is still the portrait
placeholder, are no longer shown on base pages.

Location:
main/waeup.kofa/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk

    • Property svn:ignore
      •  

        old new  
        2121faculties.csv
        2222.mr.developer.cfg
         23dist
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r16526 r16609  
    681681        # Only the Application Slip does not exist
    682682        self.assertFalse('Application Slip' in self.browser.contents)
     683        return
     684
     685    def test_upload_files(self):
     686        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     687        self.browser.open(self.manage_student_path)
     688        self.browser.getControl(name="form.firstname").value = 'John'
     689        self.browser.getControl(name="form.lastname").value = 'Tester'
     690        self.browser.getControl(name="form.reg_number").value = '345'
     691        self.browser.getControl(name="password").value = 'secret'
     692        self.browser.getControl(name="control_password").value = 'secret'
     693        self.browser.getControl("Save").click()
     694        self.assertMatches('...Form has been saved...',
     695                           self.browser.contents)
     696        ctrl = self.browser.getControl(name='passportuploadmanage')
     697        file_obj = open(SAMPLE_IMAGE, 'rb')
     698        file_ctrl = ctrl.mech_control
     699        file_ctrl.add_file(file_obj, filename='my_photo.jpg')
     700        self.browser.getControl(
     701            name='upload_passportuploadmanage').click()
     702        self.assertTrue(
     703            'src="http://localhost/app/students/K1000000/passport.jpg"'
     704            in self.browser.contents)
     705        ctrl = self.browser.getControl(name='signatureuploadmanage')
     706        file_obj = open(SAMPLE_IMAGE, 'rb')
     707        file_ctrl = ctrl.mech_control
     708        file_ctrl.add_file(file_obj, filename='my_signature.jpg')
     709        self.browser.getControl(
     710            name='upload_signatureuploadmanage').click()
     711        self.assertTrue(
     712            'src="http://localhost/app/students/K1000000/signature.jpg"'
     713            in self.browser.contents)
    683714        return
    684715
Note: See TracChangeset for help on using the changeset viewer.