Ignore:
Timestamp:
16 Jan 2013, 13:16:20 (12 years ago)
Author:
Henrik Bettermann
Message:

Let students and officers add course tickets by entering the course code on the StudyLevelEditFormPage? or StudyLevelManageFormPage? respectively. The course ticket add forms can still be used in case course code is unknown.

File:
1 edited

Legend:

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

    r9874 r9895  
    750750        self.assertTrue('zope.mgr - students.browser.StudyLevelManageFormPage '
    751751        '- K1000000 - removed: COURSE1' in logcontent)
    752         self.browser.getControl("Add course ticket").click()
     752        self.browser.getLink("here").click()
    753753        self.browser.getControl(name="form.course").value = ['COURSE1']
    754754        self.course.credits = 100
     
    759759        self.browser.getControl("Add course ticket").click()
    760760        self.assertTrue('Successfully added' in self.browser.contents)
     761        # We can do the same by adding the course on the manage page directly
     762        del self.student['studycourse']['100']['COURSE1']
     763        self.browser.getControl(name="course").value = 'COURSE1'
    761764        self.browser.getControl("Add course ticket").click()
     765        self.assertTrue('Successfully added' in self.browser.contents)
     766        self.browser.getLink("here").click()
    762767        self.browser.getControl(name="form.course").value = ['COURSE1']
    763768        self.browser.getControl("Add course ticket").click()
     
    20182023        self.browser.getLink("100").click()
    20192024        self.browser.getLink("Edit course list").click()
    2020         self.browser.getControl("Add course ticket").click()
     2025        self.browser.getLink("here").click()
    20212026        self.browser.getControl(name="form.course").value = ['COURSE1']
    20222027        self.browser.getControl("Add course ticket").click()
     
    20312036        self.browser.getLink("200").click()
    20322037        self.browser.getLink("Edit course list").click()
    2033         self.browser.getControl("Add course ticket").click()
     2038        self.browser.getLink("here").click()
    20342039        self.browser.getControl(name="form.course").value = ['COURSE1']
    20352040        self.course.credits = 100
    20362041        self.browser.getControl("Add course ticket").click()
    20372042        self.assertMatches(
    2038             '...Your total credits exceed 50...', self.browser.contents)
     2043            '...Total credits exceed 50...', self.browser.contents)
    20392044        self.course.credits = 10
    20402045        self.browser.getControl("Add course ticket").click()
     
    20632068        self.browser.getControl("Register course list").click()
    20642069        self.assertTrue('Maximum credits of 50 exceeded' in self.browser.contents)
    2065         # Student can now remove the ticket
     2070        # Student can now remove the ticket ...
    20662071        ctrl = self.browser.getControl(name='val_id')
    20672072        ctrl.getControl(value='COURSE1').selected = True
    20682073        self.browser.getControl("Remove selected", index=0).click()
    20692074        self.assertTrue('Successfully removed' in self.browser.contents)
    2070         # Course list can be registered, even if it's empty
     2075        # ... and add the same ticket using the edit page directly.
     2076        # We can do the same by adding the course on the manage page directly
     2077        self.browser.getControl(name="course").value = 'COURSE1'
     2078        self.browser.getControl("Add course ticket").click()
     2079        # Course list can be registered
    20712080        self.browser.getControl("Register course list").click()
    20722081        self.assertTrue('Course list has been registered' in self.browser.contents)
     
    20962105        self.browser.getLink("999").click()
    20972106        self.browser.getLink("Edit course list").click()
    2098         self.browser.getControl("Add course ticket").click()
     2107        self.browser.getLink("here").click()
    20992108        self.browser.getControl(name="form.course").value = ['COURSE1']
    21002109        self.browser.getControl("Add course ticket").click()
Note: See TracChangeset for help on using the changeset viewer.