Ignore:
Timestamp:
19 Sep 2018, 21:17:50 (6 years ago)
Author:
Henrik Bettermann
Message:

First draft of transcript officer landing page.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/tests/test_browser.py

    r15153 r15154  
    22672267        self.assertEqual(self.student.transcript_signees, None)
    22682268
     2269    def test_landingpage_transcript_officer(self):
     2270        IWorkflowState(self.student).setState('transcript requested')
     2271        notify(grok.ObjectModifiedEvent(self.student))
     2272        self.student.transcript_comment = (
     2273            u'On 07/08/2013 08:59:54 UTC K1000000 wrote:\n\nComment line 1 \n'
     2274            'Comment line2\n\nDispatch Address:\nAddress line 1 \n'
     2275            'Address line2\n\n')
     2276        # Create transcript officer
     2277        self.app['users'].addUser('mrtranscript', 'mrtranscriptsecret')
     2278        self.app['users']['mrtranscript'].email = 'mrtranscript@foo.ng'
     2279        self.app['users']['mrtranscript'].title = 'Ruth Gordon'
     2280        # We assign transcript officer role at faculty level
     2281        fac = self.app['faculties']['fac1']
     2282        prmlocal = IPrincipalRoleManager(fac)
     2283        prmlocal.assignRoleToPrincipal(
     2284            'waeup.local.TranscriptOfficer', 'mrtranscript')
     2285        notify(LocalRoleSetEvent(
     2286            fac, 'waeup.local.TranscriptOfficer', 'mrtranscript', granted=True))
     2287        # Login as transcript officer
     2288        self.browser.open(self.login_path)
     2289        self.browser.getControl(name="form.login").value = 'mrtranscript'
     2290        self.browser.getControl(name="form.password").value = 'mrtranscriptsecret'
     2291        self.browser.getControl("Login").click()
     2292        self.assertMatches('...You logged in...', self.browser.contents)
     2293        # Officer is on landing page
     2294        self.assertTrue(
     2295            'http://localhost/app/students/K1000000/studycourse/transcript'
     2296            in self.browser.contents)
     2297
    22692298
    22702299class StudentUITests(StudentsFullSetup):
Note: See TracChangeset for help on using the changeset viewer.