Changeset 15159
- Timestamp:
- 20 Sep 2018, 20:40:45 (6 years ago)
- Location:
- main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/browser.py
r15158 r15159 1163 1163 'validate_transcript') 1164 1164 self.flash(_('Transcript validated.')) 1165 self.redirect(self.url(self.context) )1165 self.redirect(self.url(self.context) + '/transcript') 1166 1166 return 1167 1167 … … 1187 1187 self.flash(_('You have already signed this transcript.'), 1188 1188 type="warning") 1189 self.redirect(self.url(self.context) )1189 self.redirect(self.url(self.context) + '/transcript') 1190 1190 return 1191 1191 self.flash(_('Transcript signed.')) … … 1244 1244 tz = getattr(queryUtility(IKofaUtils), 'tzinfo', pytz.utc) 1245 1245 today = now(tz).strftime('%d/%m/%Y %H:%M:%S %Z') 1246 old_transcript_comment = self.context.transcript_comment 1246 old_transcript_comment = getattr( 1247 self.context, 'transcript_comment', None) 1247 1248 if old_transcript_comment == None: 1248 1249 old_transcript_comment = '' -
main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/tests/test_browser.py
r15157 r15159 2289 2289 'http://localhost/app/students/K1000000/studycourse/transcript' 2290 2290 in self.browser.contents) 2291 self.browser.getLink("Anna Tester").click() 2292 self.assertTrue( 2293 'Anna Tester: Transcript Data' in self.browser.contents) 2294 # Officer is on transcript page and can validate the transcript 2295 self.browser.getLink("Validate transcript").click() 2296 self.assertTrue( 2297 '<div class="alert alert-success">Transcript validated.</div>' 2298 in self.browser.contents) 2299 # Officer is still on transcript page and can release the transcript 2300 self.browser.getLink("Release transcript").click() 2301 self.browser.getControl("Save comment and release transcript").click() 2302 self.assertTrue( 2303 '<div class="alert alert-success">' 2304 'Transcript released and final transcript file saved.</div>' 2305 in self.browser.contents) 2291 2306 2292 2307 def test_landingpage_transcript_signee(self): … … 2313 2328 self.assertTrue( 2314 2329 'http://localhost/app/students/K1000000/studycourse/transcript' 2330 in self.browser.contents) 2331 self.browser.getLink("Anna Tester").click() 2332 self.assertTrue( 2333 'Anna Tester: Transcript Data' in self.browser.contents) 2334 # Officer is on transcript page and can sign the transcript 2335 self.browser.getLink("Sign transcript").click() 2336 self.assertTrue( 2337 '<div class="alert alert-success">Transcript signed.</div>' 2338 in self.browser.contents) 2339 # Officer is still on transcript page 2340 self.assertTrue( 2341 'Anna Tester: Transcript Data' in self.browser.contents) 2342 # Officer can sign the transcript only once 2343 self.browser.getLink("Sign transcript").click() 2344 self.assertTrue( 2345 '<div class="alert alert-warning">' 2346 'You have already signed this transcript.</div>' 2347 in self.browser.contents) 2348 # Signature can be seen on transcript page 2349 self.assertTrue( 2350 'Electronically signed by Ruth Gordon (mrtranscript) on' 2315 2351 in self.browser.contents) 2316 2352
Note: See TracChangeset for help on using the changeset viewer.