Changeset 6896 for main


Ignore:
Timestamp:
14 Oct 2011, 09:00:42 (13 years ago)
Author:
Henrik Bettermann
Message:

Add some manage payments UI tests.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/interfaces.py

    r6877 r6896  
    134134
    135135    entry_mode = schema.Choice(
    136         title = u'Study Mode',
     136        title = u'Entry Mode',
    137137        vocabulary = study_modes,
    138138        default = u'ug_ft',
  • main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py

    r6876 r6896  
    131131        # Populate university
    132132        self.certificate = createObject('waeup.Certificate')
    133         self.certificate.code = 'CERT1'
     133        self.certificate.code = u'CERT1'
    134134        self.certificate.application_category = 'basic'
     135        self.certificate.study_mode = 'ug_ft'
    135136        self.certificate.start_level = 100
    136137        self.certificate.end_level = 500
     
    621622        return
    622623
    623     def test_manage_access(self):
    624         # Managers can add online payment tickets
     624    def test_manage_payments(self):
     625        # Managers can add and remove online payment tickets
    625626        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
    626627        self.browser.open(self.payments_student_path)
    627628        self.browser.getLink("Manage").click()
    628629        self.browser.getControl("Add online payment ticket").click()
     630        self.browser.getControl("Create ticket").click()
     631        self.assertTrue('amount could not be determined' in self.browser.contents)
     632        self.browser.open(self.manage_student_path)
     633        self.browser.getControl(name="transition").value = ['admit']
     634        self.browser.getControl("Save").click()
     635        self.browser.getControl(name="transition").value = ['start_clearance']
     636        self.browser.getControl("Save").click()
     637        self.browser.getControl(name="transition").value = ['request_clearance']
     638        self.browser.getControl("Save").click()
     639        self.browser.getControl(name="transition").value = ['clear']
     640        self.browser.getControl("Save").click()
     641        self.browser.open(self.payments_student_path + '/addop')
     642        self.browser.getControl("Create ticket").click()
     643        self.assertMatches('...ticket created...',
     644                           self.browser.contents)
     645        ctrl = self.browser.getControl(name='val_id')
     646        #import pdb; pdb.set_trace()
     647        value = ctrl.options[0]
     648        ctrl.getControl(value=value).selected = True
     649        self.browser.getControl("Remove selected", index=0).click()
     650        self.assertTrue('Successfully removed' in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.