Ignore:
Timestamp:
14 Feb 2019, 15:55:27 (6 years ago)
Author:
Henrik Bettermann
Message:

Implement course list repair page.

File:
1 edited

Legend:

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

    r15317 r15330  
    10811081        return
    10821082
     1083    def test_repair_course_list(self):
     1084        IWorkflowState(self.student).setState('school fee paid')
     1085        self.student['studycourse'].entry_session = 2016
     1086        self.student['studycourse'].current_session = 2016
     1087        self.browser.open(self.login_path)
     1088        self.browser.getControl(name="form.login").value = self.student_id
     1089        self.browser.getControl(name="form.password").value = 'spwd'
     1090        self.browser.getControl("Login").click()
     1091        self.browser.getLink("Study Course").click()
     1092        self.browser.getLink("Add course list").click()
     1093        self.browser.getControl("Create course list now").click()
     1094        self.assertTrue('Edit course list' in self.browser.contents)
     1095        self.assertFalse('Repair course list' in self.browser.contents)
     1096        self.student['studycourse'].current_level = 200
     1097        self.browser.open(self.studycourse_path + '/100')
     1098        self.assertFalse('Edit course list' in self.browser.contents)
     1099        self.assertFalse('Repair course list' in self.browser.contents)
     1100        configuration = createObject('waeup.SessionConfiguration')
     1101        configuration.academic_session = 2016
     1102        self.app['configuration'].addSessionConfiguration(configuration)
     1103        self.app['configuration']['2016'].studylevel_repair_enabled = True
     1104        self.browser.open(self.studycourse_path + '/100')
     1105        self.assertFalse('Edit course list' in self.browser.contents)
     1106        self.assertTrue('Repair course list' in self.browser.contents)
     1107        self.browser.getLink("Repair").click()
     1108        self.assertEqual(self.browser.url, self.studycourse_path + '/100/repair')
     1109        self.assertTrue('Repair course list of 100' in self.browser.contents)
     1110        return
     1111
    10831112    def test_student_clearance(self):
    10841113        # Student cant login if their password is not set
Note: See TracChangeset for help on using the changeset viewer.