Changeset 7029 for main/waeup.sirp/trunk


Ignore:
Timestamp:
8 Nov 2011, 07:39:37 (13 years ago)
Author:
Henrik Bettermann
Message:

Use always view directive for action buttons.

Add test for opening the pdf course registration slip.

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

Legend:

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

    r7028 r7029  
    645645    grok.order(1)
    646646    grok.context(IStudentStudyLevel)
     647    grok.view(StudyLevelDisplayFormPage)
    647648    grok.require('waeup.viewStudent')
    648649    icon = 'actionicon_pdf.png'
     
    10091010    grok.order(1)
    10101011    grok.context(IStudentOnlinePayment)
     1012    grok.view(OnlinePaymentDisplayFormPage)
    10111013    grok.require('waeup.viewStudent')
    10121014    icon = 'actionicon_pdf.png'
     
    13061308    grok.order(1)
    13071309    grok.context(IBedTicket)
     1310    grok.view(BedTicketDisplayFormPage)
    13081311    grok.require('waeup.viewStudent')
    13091312    icon = 'actionicon_pdf.png'
  • main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py

    r7028 r7029  
    672672        self.assertMatches('...Successfully added COURSE1...',
    673673                           self.browser.contents)
     674        # Students can open the pdf course registration slip
     675        self.browser.getLink("Download course registration slip").click()
     676        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     677        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
     678        # Students can remove course tickets
     679        self.browser.open(self.student_path + '/studycourse/200/edit')
    674680        self.browser.getControl("Remove selected", index=0).click()
    675681        self.assertTrue('No ticket selected' in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.