Changeset 9895 for main/waeup.kofa/trunk/src/waeup/kofa/students/tests
- Timestamp:
- 16 Jan 2013, 13:16:20 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r9874 r9895 750 750 self.assertTrue('zope.mgr - students.browser.StudyLevelManageFormPage ' 751 751 '- K1000000 - removed: COURSE1' in logcontent) 752 self.browser.get Control("Add course ticket").click()752 self.browser.getLink("here").click() 753 753 self.browser.getControl(name="form.course").value = ['COURSE1'] 754 754 self.course.credits = 100 … … 759 759 self.browser.getControl("Add course ticket").click() 760 760 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' 761 764 self.browser.getControl("Add course ticket").click() 765 self.assertTrue('Successfully added' in self.browser.contents) 766 self.browser.getLink("here").click() 762 767 self.browser.getControl(name="form.course").value = ['COURSE1'] 763 768 self.browser.getControl("Add course ticket").click() … … 2018 2023 self.browser.getLink("100").click() 2019 2024 self.browser.getLink("Edit course list").click() 2020 self.browser.get Control("Add course ticket").click()2025 self.browser.getLink("here").click() 2021 2026 self.browser.getControl(name="form.course").value = ['COURSE1'] 2022 2027 self.browser.getControl("Add course ticket").click() … … 2031 2036 self.browser.getLink("200").click() 2032 2037 self.browser.getLink("Edit course list").click() 2033 self.browser.get Control("Add course ticket").click()2038 self.browser.getLink("here").click() 2034 2039 self.browser.getControl(name="form.course").value = ['COURSE1'] 2035 2040 self.course.credits = 100 2036 2041 self.browser.getControl("Add course ticket").click() 2037 2042 self.assertMatches( 2038 '... Your total credits exceed 50...', self.browser.contents)2043 '...Total credits exceed 50...', self.browser.contents) 2039 2044 self.course.credits = 10 2040 2045 self.browser.getControl("Add course ticket").click() … … 2063 2068 self.browser.getControl("Register course list").click() 2064 2069 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 ... 2066 2071 ctrl = self.browser.getControl(name='val_id') 2067 2072 ctrl.getControl(value='COURSE1').selected = True 2068 2073 self.browser.getControl("Remove selected", index=0).click() 2069 2074 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 2071 2080 self.browser.getControl("Register course list").click() 2072 2081 self.assertTrue('Course list has been registered' in self.browser.contents) … … 2096 2105 self.browser.getLink("999").click() 2097 2106 self.browser.getLink("Edit course list").click() 2098 self.browser.get Control("Add course ticket").click()2107 self.browser.getLink("here").click() 2099 2108 self.browser.getControl(name="form.course").value = ['COURSE1'] 2100 2109 self.browser.getControl("Add course ticket").click()
Note: See TracChangeset for help on using the changeset viewer.