Ignore:
Timestamp:
6 Nov 2011, 17:24:21 (13 years ago)
Author:
Henrik Bettermann
Message:

Filter actions if students are using the AccommodationManageFormPage?.

I first tried to use two different pages, one for officers and one for students, and use different targets in breadcrumbs. But this was much more complicated.

File:
1 edited

Legend:

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

    r7006 r7009  
    497497        self.assertTrue('Processing of 1 rows failed' in self.browser.contents)
    498498        self.assertTrue('Successfully processed 2 rows' in self.browser.contents)
     499        return
    499500
    500501    def test_student_change_password(self):
     
    741742        self.assertMatches('...Clearance process has been started...',
    742743                           self.browser.contents)
    743 
     744        return
    744745
    745746    def test_student_payments(self):
     
    834835                           self.browser.contents)
    835836        self.assertTrue(self.student.state,'school fee paid')
     837        return
    836838
    837839    def test_manage_accommodation(self):
     
    856858        # Managers can use HOS code and book a bed space with it
    857859        self.browser.open(self.acco_student_path)
    858         self.browser.getControl("Add bed ticket").click()
     860        self.browser.getControl("Book accommodation").click()
    859861        self.assertMatches('...Wrong state...',
    860862                           self.browser.contents)
    861863        IWorkflowInfo(self.student).fireTransition('admit')
    862         self.browser.getControl("Add bed ticket").click()
     864        self.browser.getControl("Book accommodation").click()
    863865        self.assertMatches('...Activation Code:...',
    864866                           self.browser.contents)
     
    872874        self.assertTrue(bed.owner,self.student_id)
    873875        # BedTicketAddPage is now blocked
    874         self.browser.getControl("Add bed ticket").click()
     876        self.browser.getControl("Book accommodation").click()
    875877        self.assertMatches('...Ticket for 2004 already created...',
    876878            self.browser.contents)
     
    889891        self.browser.getControl("Remove selected", index=0).click()
    890892        self.assertMatches('...Successfully removed...', self.browser.contents)
    891         # Due to an event handler also the bed has been released properly
     893        # The bed has been released properly by the event handler
    892894        bed = self.app['hostels']['hall-1']['hall-1_A_101_A']
    893895        self.assertTrue(bed.owner == NOT_OCCUPIED)
     896        return
    894897
    895898    def test_student_accommodation(self):
    896         pass
     899        return
Note: See TracChangeset for help on using the changeset viewer.