Changeset 17261
- Timestamp:
- 9 Jan 2023, 21:16:28 (2 years ago)
- Location:
- main/waeup.kofa/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/CHANGES.txt
r17253 r17261 4 4 1.7.2.dev0 (unreleased) 5 5 ======================= 6 7 * Specify the role in flash message after logging in. 6 8 7 9 * Add `AccommodationViewer` role. -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r17018 r17261 689 689 self.browser.getControl("Login").click() 690 690 self.assertTrue( 691 'You logged in .' in self.browser.contents)691 'You logged in as an applicant.' in self.browser.contents) 692 692 693 693 def test_maintenance_mode(self): … … 716 716 self.login() 717 717 self.assertTrue( 718 'You logged in .' in self.browser.contents)718 'You logged in as an applicant.' in self.browser.contents) 719 719 self.browser.open(self.edit_path) 720 720 self.assertTrue(self.browser.url != self.login_path) … … 740 740 self.login() 741 741 self.assertTrue( 742 'You logged in .' in self.browser.contents)742 'You logged in as an applicant.' in self.browser.contents) 743 743 self.assertTrue( 744 744 '<strong>Congratulations!</strong> You have been offered provisional' … … 2066 2066 '\nmsg: Dear John Anthony Tester,' 2067 2067 '\nmsg: ' 2068 '\nmsg: Your application app 2020_<6-DIGITS> has been successfully submitted to Sample University.'2068 '\nmsg: Your application app%s_<6-DIGITS> has been successfully submitted to Sample University.' 2069 2069 '\nmsg: ' 2070 2070 '\nmsg: Regards' 2071 2071 '\nmsg: ' 2072 2072 % (session_1, session_1, session_2, mandate_id_0, 2073 session_1, session_1, session_2, mandate_id_1, ),2073 session_1, session_1, session_2, mandate_id_1, session_1), 2074 2074 self.get_fake_smtp_output() 2075 2075 ) -
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r16834 r17261 366 366 if SUBMIT is not None: 367 367 if self.request.principal.id != 'zope.anybody': 368 self.flash(_('You logged in.'))368 #self.flash(_('You logged in.')) 369 369 if self.request.principal.user_type == 'student': 370 self.flash(_('You logged in as a student.')) 370 371 student = grok.getSite()['students'][ 371 372 self.request.principal.id] … … 397 398 return 398 399 elif self.request.principal.user_type == 'applicant': 400 self.flash(_('You logged in as an applicant.')) 399 401 container, application_number = self.request.principal.id.split('_') 400 402 rel_link = '/applicants/%s/%s' % ( … … 406 408 site_roles = get_user_account(self.request).roles 407 409 if local_roles.has_key('waeup.local.Lecturer'): 410 self.flash(_('You logged in as a lecturer.')) 408 411 self.redirect(self.application_url() + '/my_courses') 409 412 return 410 413 if local_roles.has_key('waeup.local.TranscriptOfficer') \ 411 414 or 'waeup.TranscriptOfficer' in site_roles: 415 self.flash(_('You logged in as a transcript officer.')) 412 416 self.redirect(self.application_url() + '/my_transcript_requests') 413 417 return 414 418 if local_roles.has_key('waeup.local.TranscriptSignee'): 419 self.flash(_('You logged in as a transcript signee.')) 415 420 self.redirect(self.application_url() + '/my_transcript_signing_requests') 416 421 return 417 422 if not self.camefrom: 423 self.flash(_('You logged in as an officer.')) 418 424 self.redirect(self.application_url() + '/index') 419 425 return 426 self.flash(_('You logged in as an officer.')) 420 427 self.redirect(self.camefrom) 421 428 return -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r17176 r17261 3287 3287 self.browser.getControl("Login").click() 3288 3288 self.assertTrue( 3289 'You logged in .' in self.browser.contents)3289 'You logged in as a student.' in self.browser.contents) 3290 3290 # Now students can add the current study level 3291 3291 self.browser.getLink("Study Course").click() … … 4837 4837 # lecturers can login and will be led to landing page. 4838 4838 self.login_as_lecturer() 4839 self.assertMatches('...You logged in...', self.browser.contents) 4839 self.assertTrue( 4840 'You logged in as a lecturer.' in self.browser.contents) 4840 4841 self.assertEqual(self.browser.url, URL_LECTURER_LANDING) 4841 4842 self.assertTrue( … … 5213 5214 self.browser.getControl("Login").click() 5214 5215 self.assertTrue( 5215 'You logged in .' in self.browser.contents)5216 'You logged in as a student.' in self.browser.contents) 5216 5217 self.assertTrue( 5217 5218 '<a href="http://localhost/app/students/K1000000">Base Data</a>'
Note: See TracChangeset for help on using the changeset viewer.