Ignore:
Timestamp:
26 Aug 2011, 20:54:25 (13 years ago)
Author:
Henrik Bettermann
Message:

Make action buttons smaller on studentpage.

Add StudentAccommodation? container class which contains the accommodation objects.

Add StudentPayments? container class which contains the payments objects.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/students/tests
Files:
2 edited

Legend:

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

    r6632 r6635  
    7272
    7373
    74         # Add student
     74        # Add student with subobjects (done by addStudent)
    7575        student = Student()
    7676        student.name = u'Anna Tester'
    7777        student.student_id = u'Z654321'
    78         self.app['students'][student.student_id] = student
     78        self.app['students'].addStudent(student)
    7979
    8080        self.container_path = 'http://localhost/app/students'
     
    8888        self.edit_personal_student_path = self.student_path + '/edit_personal'
    8989
     90        self.studycourse_student_path = self.student_path + '/studycourse'
     91        self.payments_student_path = self.student_path + '/payments'
     92        self.accommodation_student_path = self.student_path + '/accommodation'
     93
    9094        # Populate university
    9195        certificate = createObject('waeup.Certificate')
     
    188192        # and can perform actions
    189193        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     194
    190195        self.browser.open(self.student_path)
    191196        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    192197        self.assertEqual(self.browser.url, self.student_path)
    193         self.browser.getLink("Edit base data").click()
     198        self.browser.getLink("Edit").click()
    194199        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    195200        self.assertEqual(self.browser.url, self.manage_student_path)
    196         self.browser.open(self.student_path)
    197         self.browser.getLink("View clearance data").click()
     201
     202        self.browser.open(self.student_path)
     203        self.browser.getLink("Clearance Data").click()
    198204        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    199205        self.assertEqual(self.browser.url, self.clearance_student_path)
    200         self.browser.getLink("Edit clearance data").click()
     206        self.browser.getLink("Edit").click()
    201207        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    202208        self.assertEqual(self.browser.url, self.edit_clearance_student_path)
    203         self.browser.open(self.student_path)
    204         self.browser.getLink("View personal data").click()
     209
     210        self.browser.open(self.student_path)
     211        self.browser.getLink("Personal Data").click()
    205212        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    206213        self.assertEqual(self.browser.url, self.personal_student_path)
    207         self.browser.getLink("Edit personal data").click()
     214        self.browser.getLink("Edit").click()
    208215        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    209216        self.assertEqual(self.browser.url, self.edit_personal_student_path)
     217
     218        self.browser.open(self.student_path)
     219        self.browser.getLink("Study Course").click()
     220        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     221        self.assertEqual(self.browser.url, self.studycourse_student_path)
     222
     223        self.browser.open(self.student_path)
     224        self.browser.getLink("Payments").click()
     225        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     226        self.assertEqual(self.browser.url, self.payments_student_path)
     227
     228        self.browser.open(self.student_path)
     229        self.browser.getLink("Accommodation").click()
     230        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     231        self.assertEqual(self.browser.url, self.accommodation_student_path)
     232
    210233        return
  • main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_student.py

    r6633 r6635  
    3030    Student, StudentFactory,
    3131    )
    32 from waeup.sirp.students.studycourse import (
    33     StudentStudyCourse,
    34     )
     32from waeup.sirp.students.studycourse import StudentStudyCourse
     33from waeup.sirp.students.payments import StudentPayments
     34from waeup.sirp.students.accommodation import StudentAccommodation
    3535from waeup.sirp.students.interfaces import (
    36     IStudent, IStudentStudyCourse,
     36    IStudent, IStudentStudyCourse, IStudentPayments, IStudentAccommodation,
    3737    )
    3838from waeup.sirp.testing import FunctionalLayer
     
    4646        self.student = Student()
    4747        self.studycourse = StudentStudyCourse()
     48        self.payments = StudentPayments()
     49        self.accommodation = StudentAccommodation()
    4850        return
    4951
     
    5759        verify.verifyClass(IStudentStudyCourse, StudentStudyCourse)
    5860        verify.verifyObject(IStudentStudyCourse, self.studycourse)
     61        verify.verifyClass(IStudentPayments, StudentPayments)
     62        verify.verifyObject(IStudentPayments, self.payments)
     63        verify.verifyClass(IStudentAccommodation, StudentAccommodation)
     64        verify.verifyObject(IStudentAccommodation, self.accommodation)
    5965        return
    6066
Note: See TracChangeset for help on using the changeset viewer.