Ignore:
Timestamp:
7 Jun 2016, 20:08:05 (9 years ago)
Author:
Henrik Bettermann
Message:

Remove application fee fallback option. This option has never been used and is confusing.

Hide Payment Tickets section on application pages if fee isn't set.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py

    r13657 r13886  
    887887        self.login()
    888888        self.browser.open(self.edit_path)
    889         # Payment tickets can't be created before the form has been validated
    890         self.browser.getControl("Add online payment ticket").click()
    891         self.assertTrue('Required input is missing' in self.browser.contents)
    892889        self.fill_correct_values()
    893890        # We have to save the form otherwise the filled fields will be cleared
     
    895892        # requires a filled form but does not save it
    896893        self.browser.getControl("Save").click()
     894        # Payment section does not appear if application fee isn't set
     895        self.assertFalse('Payment Tickets' in self.browser.contents)
     896        self.assertFalse('Add online payment' in self.browser.contents)
     897        self.applicantscontainer.application_fee = 200.0
     898        self.browser.open(self.edit_path)
    897899        self.browser.getControl("Add online payment ticket").click()
    898900        # Session object missing
     
    902904        configuration = SessionConfiguration()
    903905        configuration.academic_session = session_1
    904         configuration.application_fee = 200.0
    905906        self.app['configuration'].addSessionConfiguration(configuration)
    906907        self.browser.open(self.edit_path)
     
    910911        self.assertMatches('...Activation Code...',
    911912                           self.browser.contents)
     913        self.assertTrue(
     914            '<span>200.0</span>' in self.browser.contents)
    912915        # Payment ticket can be removed if they haven't received a
    913916        # valid callback
     
    10081011        return
    10091012
    1010     def test_pay_container_application_fee(self):
    1011         self.login()
    1012         self.browser.open(self.edit_path)
    1013         self.fill_correct_values()
    1014         self.browser.getControl("Save").click()
    1015         configuration = SessionConfiguration()
    1016         configuration.academic_session = session_1
    1017         self.applicantscontainer.application_fee = 120.0
    1018         configuration.application_fee = 9999.9
    1019         self.app['configuration'].addSessionConfiguration(configuration)
    1020         self.browser.open(self.edit_path)
    1021         self.browser.getControl("Add online payment ticket").click()
    1022         self.assertMatches('...Payment ticket created...',
    1023                            self.browser.contents)
    1024         self.assertMatches('...Payment ticket created...',
    1025                            self.browser.contents)
    1026         self.assertFalse(
    1027             '<span>9999.9</span>' in self.browser.contents)
    1028         self.assertTrue(
    1029             '<span>120.0</span>' in self.browser.contents)
    1030         self.assertTrue(
    1031             '<span>Application Fee</span>' in self.browser.contents)
    1032         return
    1033 
    10341013    def prepare_special_container(self):
    10351014        # Add special application container
Note: See TracChangeset for help on using the changeset viewer.