Ignore:
Timestamp:
15 Sep 2011, 12:05:59 (13 years ago)
Author:
Henrik Bettermann
Message:

Check if reg_number or matric_number exist when editing student base data.

File:
1 edited

Legend:

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

    r6775 r6779  
    173173        self.assertTrue('Student record created' in self.browser.contents)
    174174
    175         # Registration numbers must be unique
    176         #self.browser.getLink("Manage").click()
    177         #self.browser.getControl(name="form.reg_number").value = '123'
    178         #self.browser.getControl("Save").click()
    179         #self.assertMatches('...value already exists in catalog...',
    180         #                   self.browser.contents)
     175        # Registration and matric numbers must be unique
     176        self.browser.getLink("Manage").click()
     177        self.browser.getControl(name="form.reg_number").value = '123'
     178        self.browser.getControl("Save").click()
     179        self.assertMatches('...Registration number exists...',
     180                           self.browser.contents)
     181        self.browser.getControl(name="form.reg_number").value = '789'
     182        self.browser.getControl(name="form.matric_number").value = '234'
     183        self.browser.getControl("Save").click()
     184        self.assertMatches('...Matriculation number exists...',
     185                           self.browser.contents)
    181186
    182187        self.browser.open(self.container_path)
     
    233238        self.browser.getControl(name="transition").value = ['admit']
    234239        self.browser.getControl(name="form.name").value = 'John Tester'
    235         self.browser.getControl(name="form.reg_number").value = '123'
     240        self.browser.getControl(name="form.reg_number").value = '345'
    236241        self.browser.getControl(name="password").value = 'secret'
    237242        self.browser.getControl(name="control_password").value = 'secret'
Note: See TracChangeset for help on using the changeset viewer.