Changeset 6799 for main/waeup.sirp/trunk/src/waeup/sirp/students/tests
- Timestamp:
- 19 Sep 2011, 11:47:08 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
r6798 r6799 124 124 self.app['faculties']['fac1']['dep1'].certificates.addCertificate( 125 125 self.certificate) 126 self.course = createObject('waeup.Course') 127 self.course.code = 'COURSE1' 128 self.course.semester = 1 129 self.course.credits = 10 130 self.course.passmark = 40 131 self.app['faculties']['fac1']['dep1'].courses.addCourse( 132 self.course) 133 self.app['faculties']['fac1']['dep1'].certificates['CERT1'].addCourseRef( 134 self.course, level=100) 126 135 127 136 # Put the prepopulated site into test ZODB and prepare test … … 218 227 self.browser.getControl("Search").click() 219 228 self.assertTrue('No student found' in self.browser.contents) 229 return 220 230 221 231 class StudentUITests(StudentsFullSetup): … … 282 292 self.assertMatches('...Student admitted by zope.mgr...', 283 293 self.browser.contents) 294 return 284 295 285 296 def test_manage_course_lists(self): … … 303 314 self.browser.getControl(name="addlevel").value = ['100'] 304 315 self.browser.getControl("Add study level").click() 305 self.assertMatches('...<span>100</span>...', 306 self.browser.contents) 316 self.assertMatches('...<span>100</span>...', self.browser.contents) 317 # Managers can view and manage course lists 318 self.browser.getLink("100").click() 319 self.assertMatches('...: Study Level 100 (Year 1)...', self.browser.contents) 320 self.browser.getLink("Manage").click() 321 self.browser.getControl(name="form.level_session").value = ['2002'] 322 self.browser.getControl("Save").click() 323 ctrl = self.browser.getControl(name='val_id') 324 ctrl.getControl(value='COURSE1').selected = True 325 self.browser.getControl("Remove selected", index=0).click() 326 self.assertTrue('Successfully removed' in self.browser.contents) 327 self.browser.getControl("Add course ticket").click() 328 self.browser.getControl(name="form.course").value = ['COURSE1'] 329 self.browser.getControl("Add course ticket").click() 330 self.assertTrue('Successfully added' in self.browser.contents) 331 self.browser.getLink("COURSE1").click() 332 self.browser.getLink("Manage").click() 333 self.browser.getControl(name="form.score").value = '10' 334 self.browser.getControl("Save").click() 335 self.assertTrue('Form has been saved' in self.browser.contents) 336 return 307 337 308 338 def test_manage_workflow(self): … … 441 471 self.assertMatches('...The requested form is locked...', 442 472 self.browser.contents) 473 return
Note: See TracChangeset for help on using the changeset viewer.