Ignore:
Timestamp:
5 Jun 2015, 16:57:10 (10 years ago)
Author:
Henrik Bettermann
Message:

Students can open the customized pdf course registration slip only if they
have registered their course list.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py

    r13036 r13038  
    418418        return
    419419
     420    def test_student_course_registration(self):
     421        # Uniben students see grade instead of score on all level pages
     422        # and on course ticket page.
     423        IWorkflowState(self.student).setState('school fee paid')
     424        self.browser.open(self.login_path)
     425        self.browser.getControl(name="form.login").value = self.student_id
     426        self.browser.getControl(name="form.password").value = 'spwd'
     427        self.browser.getControl("Login").click()
     428        # Now students can add the current study level
     429        self.browser.getLink("Study Course").click()
     430        self.browser.getLink("Add course list").click()
     431        self.assertMatches('...Add current level 100 (Year 1)...',
     432                           self.browser.contents)
     433        self.browser.getControl("Create course list now").click()
     434        # Students can open the customized pdf course registration slip
     435        # if they have registered their course list
     436        self.browser.open(
     437            self.student_path + '/studycourse/100/course_registration_slip.pdf')
     438        self.assertTrue('Forbidden' in self.browser.contents)
     439        IWorkflowState(self.student).setState('courses registered')
     440        self.browser.open(self.student_path + '/studycourse/100')
     441        self.browser.getLink("Download course registration slip").click()
     442        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     443        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
Note: See TracChangeset for help on using the changeset viewer.