Changeset 6914 for main/waeup.sirp/trunk/src/waeup/sirp/students/tests
- Timestamp:
- 20 Oct 2011, 16:48:59 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
r6900 r6914 337 337 self.browser.getControl("Add study level").click() 338 338 self.assertMatches('...<span>100</span>...', self.browser.contents) 339 self.browser.getControl("Add study level").click() 340 self.assertMatches('...This level exists...', self.browser.contents) 341 self.browser.getControl("Remove selected").click() 342 self.assertMatches('...No study level selected...', self.browser.contents) 339 343 self.browser.getControl(name="val_id").value = ['100'] 340 344 self.browser.getControl("Remove selected").click() 341 345 self.assertMatches('...Successfully removed...', self.browser.contents) 342 # Add againlevel again346 # Add level again 343 347 self.browser.getControl(name="addlevel").value = ['100'] 344 348 self.browser.getControl("Add study level").click() 349 self.browser.getControl(name="addlevel").value = ['100'] 345 350 346 351 # Managers can view and manage course lists … … 350 355 self.browser.getControl(name="form.level_session").value = ['2002'] 351 356 self.browser.getControl("Save").click() 357 self.browser.getControl("Remove selected").click() 358 self.assertMatches('...No ticket selected...', self.browser.contents) 352 359 ctrl = self.browser.getControl(name='val_id') 353 360 ctrl.getControl(value='COURSE1').selected = True … … 358 365 self.browser.getControl("Add course ticket").click() 359 366 self.assertTrue('Successfully added' in self.browser.contents) 367 self.browser.getControl("Add course ticket").click() 368 self.browser.getControl(name="form.course").value = ['COURSE1'] 369 self.browser.getControl("Add course ticket").click() 370 self.assertTrue('The ticket exists' in self.browser.contents) 371 self.browser.getControl("Cancel").click() 360 372 self.browser.getLink("COURSE1").click() 361 373 self.browser.getLink("Manage").click() … … 564 576 self.browser.getLink("Clearance Data").click() 565 577 self.browser.getLink("Start clearance").click() 578 self.browser.getControl(name="ac_series").value = '3' 579 self.browser.getControl(name="ac_number").value = '4444444' 580 self.browser.getControl("Start clearance now").click() 581 self.assertMatches('...Access code is invalid...', 582 self.browser.contents) 566 583 self.browser.getControl(name="ac_series").value = self.existing_clrseries 567 584 self.browser.getControl(name="ac_number").value = self.existing_clrnumber … … 585 602 self.assertMatches('...The requested form is locked...', 586 603 self.browser.contents) 604 # Student can't add study level if not in state 'school fee paid' 605 self.browser.open(self.student_path + '/studycourse/add') 606 self.assertMatches('...The requested form is locked...', 607 self.browser.contents) 608 # ... and must be transferred first 587 609 IWorkflowInfo(student).fireTransition('clear') 588 610 IWorkflowInfo(student).fireTransition('pay_first_school_fee') 589 # Students can add the current study level611 # Now students can add the current study level 590 612 self.browser.getLink("Study Course").click() 591 613 self.browser.getLink("Add course list").click() … … 613 635 self.assertMatches('...Successfully added COURSE1...', 614 636 self.browser.contents) 637 self.browser.getControl("Remove selected", index=0).click() 638 self.assertTrue('No ticket selected' in self.browser.contents) 615 639 ctrl = self.browser.getControl(name='val_id') 616 640 ctrl.getControl(value='COURSE1').selected = True … … 636 660 self.assertMatches('...Amount Authorized...', 637 661 self.browser.contents) 638 self.browser.open(self.payments_student_path + '/manage') 662 self.browser.open(self.payments_student_path) 663 self.browser.getLink('Manage').click() 664 self.browser.getControl("Remove selected").click() 665 self.assertMatches('...No payment selected...', self.browser.contents) 639 666 ctrl = self.browser.getControl(name='val_id') 640 667 value = ctrl.options[0]
Note: See TracChangeset for help on using the changeset viewer.