Changeset 6800
- Timestamp:
- 19 Sep 2011, 14:10:10 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
r6799 r6800 175 175 return 176 176 elif student_pw: 177 self.flash('Password has already been set. ')177 self.flash('Password has already been set. You are using the wrong Access Code.') 178 178 return 179 179 # Mark pin as used (this also fires a pin related transition) -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
r6799 r6800 311 311 self.browser.getControl(name="form.current_level").value = ['100'] 312 312 self.browser.getControl("Save").click() 313 # Managers can add a any study level (course list)313 # Managers can add and remove any study level (course list) 314 314 self.browser.getControl(name="addlevel").value = ['100'] 315 315 self.browser.getControl("Add study level").click() 316 316 self.assertMatches('...<span>100</span>...', self.browser.contents) 317 self.browser.getControl(name="val_id").value = ['100'] 318 self.browser.getControl("Remove selected").click() 319 self.assertMatches('...Successfully removed...', self.browser.contents) 320 # Add again level again 321 self.browser.getControl(name="addlevel").value = ['100'] 322 self.browser.getControl("Add study level").click() 323 317 324 # Managers can view and manage course lists 318 325 self.browser.getLink("100").click() … … 419 426 self.browser.getControl(name="ac_series").value = self.existing_pwdseries 420 427 self.browser.getControl(name="ac_number").value = self.existing_pwdnumber 428 self.browser.getControl(name="reg_number").value = '223456' 429 self.browser.getControl("Show").click() 430 self.assertMatches('...No student found...', 431 self.browser.contents) 432 self.browser.getControl(name="reg_number").value = '123456' 433 self.browser.getControl(name="ac_number").value = '999999' 434 self.browser.getControl("Show").click() 435 self.assertMatches('...Access code is invalid...', 436 self.browser.contents) 437 self.browser.getControl(name="ac_number").value = self.existing_pwdnumber 438 self.browser.getControl("Show").click() 439 self.assertMatches('...Password has been set. Your Student Id is...', 440 self.browser.contents) 441 self.browser.getControl("Show").click() 442 self.assertMatches( 443 '...Password has already been set. Your Student Id is...', 444 self.browser.contents) 445 existing_pwdpin = self.pwdpins[1] 446 parts = existing_pwdpin.split('-')[1:] 447 existing_pwdseries, existing_pwdnumber = parts 448 self.browser.getControl(name="ac_series").value = existing_pwdseries 449 self.browser.getControl(name="ac_number").value = existing_pwdnumber 421 450 self.browser.getControl(name="reg_number").value = '123456' 422 451 self.browser.getControl("Show").click() 423 self.assertMatches('...Password has been set. Your Student Id is...', 424 self.browser.contents) 452 self.assertMatches( 453 '...You are using the wrong Access Code...', 454 self.browser.contents) 425 455 # The student can login with the new credentials 426 456 self.browser.open(self.login_path)
Note: See TracChangeset for help on using the changeset viewer.