Ignore:
Timestamp:
29 Jun 2012, 21:22:38 (12 years ago)
Author:
Henrik Bettermann
Message:

Returning students do not necessarily have a registration number and can use their matric. number instead.

File:
1 edited

Legend:

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

    r8820 r8854  
    18941894
    18951895    def test_request_pw(self):
    1896         # Student with wrong reg_number can't be found.
     1896        # Student with wrong number can't be found.
    18971897        self.browser.open('http://localhost/app/requestpw')
    18981898        self.browser.getControl(name="form.firstname").value = 'Anna'
    1899         self.browser.getControl(name="form.reg_number").value = 'anynumber'
     1899        self.browser.getControl(name="form.number").value = 'anynumber'
    19001900        self.browser.getControl(name="form.email").value = 'xx@yy.zz'
    1901         self.browser.getControl("Get login credentials").click()
     1901        self.browser.getControl("Send login credentials").click()
    19021902        self.assertTrue('No student record found.'
    19031903            in self.browser.contents)
     
    19061906        self.browser.open('http://localhost/app/requestpw')
    19071907        self.browser.getControl(name="form.firstname").value = 'Johnny'
    1908         self.browser.getControl(name="form.reg_number").value = '123'
     1908        self.browser.getControl(name="form.number").value = '123'
    19091909        self.browser.getControl(name="form.email").value = 'xx@yy.zz'
    1910         self.browser.getControl("Get login credentials").click()
     1910        self.browser.getControl("Send login credentials").click()
    19111911        self.assertTrue('No student record found.'
    19121912            in self.browser.contents)
     
    19141914        # password has been set and used.
    19151915        self.browser.getControl(name="form.firstname").value = 'Anna'
    1916         self.browser.getControl(name="form.reg_number").value = '123'
    1917         self.browser.getControl("Get login credentials").click()
     1916        self.browser.getControl(name="form.number").value = '123'
     1917        self.browser.getControl("Send login credentials").click()
    19181918        self.assertTrue('Your password has already been set and used.'
    19191919            in self.browser.contents)
     
    19221922        # The firstname field, used for verification, is not case-sensitive.
    19231923        self.browser.getControl(name="form.firstname").value = 'aNNa'
    1924         self.browser.getControl(name="form.reg_number").value = '123'
     1924        self.browser.getControl(name="form.number").value = '123'
    19251925        self.browser.getControl(name="form.email").value = 'new@yy.zz'
    1926         self.browser.getControl("Get login credentials").click()
     1926        self.browser.getControl("Send login credentials").click()
    19271927        # Yeah, we succeded ...
     1928        self.assertTrue('Your password request was successful.'
     1929            in self.browser.contents)
     1930        # We can also use the matric_number instead.
     1931        self.browser.open('http://localhost/app/requestpw')
     1932        self.browser.getControl(name="form.firstname").value = 'aNNa'
     1933        self.browser.getControl(name="form.number").value = '234'
     1934        self.browser.getControl(name="form.email").value = 'new@yy.zz'
     1935        self.browser.getControl("Send login credentials").click()
    19281936        self.assertTrue('Your password request was successful.'
    19291937            in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.