Ignore:
Timestamp:
21 Sep 2018, 09:32:42 (6 years ago)
Author:
Henrik Bettermann
Message:

Remove manageStudent permission.
Show tables on landing pages.
Adjust tests.

File:
1 edited

Legend:

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

    r15159 r15162  
    21272127            'Comment line2\n\nDispatch Address:\nAddress line 1 \n'
    21282128            'Address line2\n\n')
    2129         # Create transcript officer
     2129        # Create officer with both roles
    21302130        self.app['users'].addUser('mrtranscript', 'mrtranscriptsecret')
    21312131        self.app['users']['mrtranscript'].email = 'mrtranscript@foo.ng'
     
    21332133        prmglobal = IPrincipalRoleManager(self.app)
    21342134        prmglobal.assignRoleToPrincipal('waeup.TranscriptOfficer', 'mrtranscript')
    2135         # Login as transcript officer
     2135        prmglobal.assignRoleToPrincipal('waeup.StudentsManager', 'mrtranscript')
     2136        prmglobal.assignRoleToPrincipal('waeup.TranscriptSignee', 'mrtranscript')
     2137        # Login
    21362138        self.browser.open(self.login_path)
    21372139        self.browser.getControl(name="form.login").value = 'mrtranscript'
     
    21862188        self.browser.open(self.studycourse_path + '/100/COURSE1/manage')
    21872189        self.assertTrue('The requested form is locked' in self.browser.contents)
     2190
    21882191        # Transcript can be signed if officer has the permission to sign
    2189         self.browser.open(self.studycourse_path + '/transcript')
    2190         self.assertFalse('Sign transcript' in self.browser.contents)
    2191         prmglobal = IPrincipalRoleManager(self.app)
    2192         prmglobal.assignRoleToPrincipal('waeup.TranscriptSignee', 'mrtranscript')
     2192        #self.browser.open(self.studycourse_path + '/transcript')
     2193        #self.assertFalse('Sign transcript' in self.browser.contents)
     2194        #prmglobal = IPrincipalRoleManager(self.app)
     2195        #prmglobal.assignRoleToPrincipal('waeup.TranscriptSignee', 'mrtranscript')
     2196
    21932197        self.browser.open(self.studycourse_path + '/transcript')
    21942198        self.browser.getLink("Sign transcript electronically").click()
     
    22492253        self.assertEqual(self.browser.headers['Content-Type'],
    22502254                         'application/pdf')
    2251         # Transcript views are no longer accesssible
     2255        # Transcript views are no longer accessible
    22522256        self.browser.open(self.studycourse_path)
    22532257        self.assertFalse('studycourse/transcript' in self.browser.contents)
     
    22892293            'http://localhost/app/students/K1000000/studycourse/transcript'
    22902294            in self.browser.contents)
    2291         self.browser.getLink("Anna Tester").click()
     2295        self.browser.getLink("K1000000").click()
    22922296        self.assertTrue(
    22932297            'Anna Tester: Transcript Data' in self.browser.contents)
     
    23292333            'http://localhost/app/students/K1000000/studycourse/transcript'
    23302334            in self.browser.contents)
    2331         self.browser.getLink("Anna Tester").click()
     2335        self.browser.getLink("K1000000").click()
    23322336        self.assertTrue(
    23332337            'Anna Tester: Transcript Data' in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.