Ignore:
Timestamp:
30 Nov 2012, 07:01:34 (12 years ago)
Author:
Henrik Bettermann
Message:

Adjust tests to the new filterstudents pages. The buttons now redirect to these pages.

ToDo?: Course Advisers should not be able to select the level.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py

    r9637 r9740  
    445445    icon = 'actionicon_student.png'
    446446    text = _('Show students')
    447     target = 'showdepstudents'
     447    target = 'students'
    448448
    449449class ManageCourseActionButton(ManageActionButton):
     
    469469    icon = 'actionicon_student.png'
    470470    text = _('Show students')
    471     target = 'showcoursestudents'
     471    target = 'students'
    472472
    473473class ShowCertificateStudentsActionButton(ManageActionButton):
     
    479479    icon = 'actionicon_student.png'
    480480    text = _('Show students')
    481     target = 'showcertstudents'
     481    target = 'students'
    482482
    483483class ManageCertificateCourseActionButton(ManageActionButton):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r9733 r9740  
    13061306        # ... and view the list of students
    13071307        self.browser.getLink("Show students").click()
     1308        self.browser.getControl(name="session").value = ['2004']
     1309        self.browser.getControl(name="level").value = ['200']
     1310        self.browser.getControl("Show").click()
     1311        self.assertFalse(self.student_id in self.browser.contents)
     1312        self.browser.getControl(name="session").value = ['2004']
     1313        self.browser.getControl(name="level").value = ['100']
     1314        self.browser.getControl("Show").click()
    13081315        self.assertTrue(self.student_id in self.browser.contents)
    13091316        # The comment is indicated by 'yes'
     
    14631470        # and view the list of students
    14641471        self.browser.getLink("Show students").click()
    1465         self.assertTrue('<th>Fullname</th>' in self.browser.contents)
     1472        self.browser.getControl(name="session").value = ['2004']
     1473        self.browser.getControl(name="level").value = ['100']
     1474        self.browser.getControl("Show").click()
     1475        self.assertTrue('No student found.' in self.browser.contents)
    14661476        # No student in course so far
    14671477        self.assertFalse(self.student_id in self.browser.contents)
    14681478        studylevel = createObject(u'waeup.StudentStudyLevel')
    14691479        studylevel.level = 100
     1480        studylevel.level_session = 2004
    14701481        self.student['studycourse'].addStudentStudyLevel(
    14711482            self.certificate, studylevel)
    14721483        # Now the student has registered the course and can
    14731484        # be seen by the lecturer.
    1474         self.browser.open("http://localhost/app/faculties/fac1/dep1/courses/COURSE1/showcoursestudents")
     1485        self.browser.open("http://localhost/app/faculties/fac1/dep1/courses/COURSE1/students")
     1486        self.browser.getControl(name="session").value = ['2004']
     1487        self.browser.getControl(name="level").value = ['100']
     1488        self.browser.getControl("Show").click()
    14751489        self.assertTrue(self.student_id in self.browser.contents)
    14761490        # XXX: So far the lecturer can neither access ths student ...
Note: See TracChangeset for help on using the changeset viewer.