Ignore:
Timestamp:
13 Jan 2014, 11:06:33 (11 years ago)
Author:
Henrik Bettermann
Message:

We can't test clearance payment ticket creation at the moment, since Uniben decided to deactivate clearance for ug students.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py

    r10836 r10902  
    144144
    145145        # Create clearance fee ticket
    146         self.browser.open(self.payments_path + '/addop')
    147         self.browser.getControl(name="form.p_category").value = ['clearance']
    148         self.browser.getControl("Create ticket").click()
    149         ctrl = self.browser.getControl(name='val_id')
    150         value = ctrl.options[2]
    151         self.browser.getLink(value).click()
    152         self.assertMatches(
    153             '...<span>45000.0</span>...',
    154             self.browser.contents)
    155         # Manager can access InterswitchForm
    156         self.browser.getLink("CollegePAY", index=0).click()
    157         self.assertEqual(self.student['payments'][value].provider_amt, 1500.0)
    158         self.assertEqual(self.student['payments'][value].gateway_amt, 150.0)
    159         self.assertMatches('...<input type="hidden" name="pay_item_id" value="5702" />...',
    160                            self.browser.contents)
    161         self.assertMatches('...Total Amount Authorized:...',
    162                            self.browser.contents)
    163         self.assertMatches(
    164             '...<input type="hidden" name="amount" value="4500000.0" />...',
    165             self.browser.contents)
    166         self.assertMatches(
    167             '...item_name="Acceptance Fee" item_amt="4335000" bank_id="7" acct_num="1003475516"...',
    168             self.browser.contents)
    169         self.assertMatches(
    170             '...item_name="BT Education" item_amt="150000" bank_id="117" acct_num="1010764827"...',
    171             self.browser.contents)
     146        #self.browser.open(self.payments_path + '/addop')
     147        #self.browser.getControl(name="form.p_category").value = ['clearance']
     148        #self.browser.getControl("Create ticket").click()
     149        #ctrl = self.browser.getControl(name='val_id')
     150        #value = ctrl.options[2]
     151        #self.browser.getLink(value).click()
     152        #self.assertMatches(
     153        #    '...<span>45000.0</span>...',
     154        #    self.browser.contents)
     155        ## Manager can access InterswitchForm
     156        #self.browser.getLink("CollegePAY", index=0).click()
     157        #self.assertEqual(self.student['payments'][value].provider_amt, 1500.0)
     158        #self.assertEqual(self.student['payments'][value].gateway_amt, 150.0)
     159        #self.assertMatches('...<input type="hidden" name="pay_item_id" value="5702" />...',
     160        #                   self.browser.contents)
     161        #self.assertMatches('...Total Amount Authorized:...',
     162        #                   self.browser.contents)
     163        #self.assertMatches(
     164        #    '...<input type="hidden" name="amount" value="4500000.0" />...',
     165        #    self.browser.contents)
     166        #self.assertMatches(
     167        #    '...item_name="Acceptance Fee" item_amt="4335000" bank_id="7" acct_num="1003475516"...',
     168        #    self.browser.contents)
     169        #self.assertMatches(
     170        #    '...item_name="BT Education" item_amt="150000" bank_id="117" acct_num="1010764827"...',
     171        #    self.browser.contents)
    172172
    173173        # Create gown fee ticket
     
    178178        self.browser.getControl("Create ticket").click()
    179179        ctrl = self.browser.getControl(name='val_id')
    180         value = ctrl.options[3]
     180        value = ctrl.options[2]
    181181        self.browser.getLink(value).click()
    182182        self.assertMatches(
     
    205205        self.browser.getControl("Create ticket").click()
    206206        ctrl = self.browser.getControl(name='val_id')
    207         value = ctrl.options[4]
     207        value = ctrl.options[3]
    208208        self.browser.getLink(value).click()
    209209        self.assertMatches(
     
    233233        self.app['configuration'].addSessionConfiguration(configuration)
    234234        self.student['studycourse'].entry_session = 2002
    235         self.browser.open(self.payments_path + '/addpp')
    236         self.browser.getControl(name="form.p_category").value = ['clearance']
    237         self.browser.getControl(name="form.p_session").value = ['2003']
    238         self.browser.getControl(name="form.p_level").value = ['300']
    239         self.browser.getControl("Create ticket").click()
    240         ctrl = self.browser.getControl(name='val_id')
    241         value = ctrl.options[5]
    242         self.browser.getLink(value).click()
    243         self.assertMatches(
    244             '...<span>45000.0</span>...',
    245             self.browser.contents)
    246         # Manager can access InterswitchForm
    247         self.browser.getLink("CollegePAY", index=0).click()
    248         self.assertEqual(self.student['payments'][value].provider_amt, 1500.0)
    249         self.assertEqual(self.student['payments'][value].gateway_amt, 150.0)
    250         self.assertMatches('...<input type="hidden" name="pay_item_id" value="5702" />...',
    251                            self.browser.contents)
    252         self.assertMatches('...Total Amount Authorized:...',
    253                            self.browser.contents)
    254         self.assertMatches(
    255             '...<input type="hidden" name="amount" value="4500000.0" />...',
    256             self.browser.contents)
    257         self.assertMatches(
    258             '...<item_detail item_id="1" item_name="Acceptance Fee" item_amt="4335000" bank_id="7" acct_num="1003475516" />...',
    259             self.browser.contents)
     235        #self.browser.open(self.payments_path + '/addpp')
     236        #self.browser.getControl(name="form.p_category").value = ['clearance']
     237        #self.browser.getControl(name="form.p_session").value = ['2003']
     238        #self.browser.getControl(name="form.p_level").value = ['300']
     239        #self.browser.getControl("Create ticket").click()
     240        #ctrl = self.browser.getControl(name='val_id')
     241        #value = ctrl.options[5]
     242        #self.browser.getLink(value).click()
     243        #self.assertMatches(
     244        #    '...<span>45000.0</span>...',
     245        #    self.browser.contents)
     246        ## Manager can access InterswitchForm
     247        #self.browser.getLink("CollegePAY", index=0).click()
     248        #self.assertEqual(self.student['payments'][value].provider_amt, 1500.0)
     249        #self.assertEqual(self.student['payments'][value].gateway_amt, 150.0)
     250        #self.assertMatches('...<input type="hidden" name="pay_item_id" value="5702" />...',
     251        #                   self.browser.contents)
     252        #self.assertMatches('...Total Amount Authorized:...',
     253        #                   self.browser.contents)
     254        ##self.assertMatches(
     255        #    '...<input type="hidden" name="amount" value="4500000.0" />...',
     256        #    self.browser.contents)
     257        #self.assertMatches(
     258        #    '...<item_detail item_id="1" item_name="Acceptance Fee" item_amt="4335000" bank_id="7" acct_num="1003475516" />...',
     259        #    self.browser.contents)
    260260
    261261        # Create balance payment ticket
     
    267267        self.browser.getControl("Create ticket").click()
    268268        ctrl = self.browser.getControl(name='val_id')
    269         value = ctrl.options[6]
     269        value = ctrl.options[4]
    270270        self.browser.getLink(value).click()
    271271        self.assertMatches(
  • main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py

    r10836 r10902  
    8282        self.certificate.study_mode = 'pg_ft'
    8383        self.browser.open(self.clearance_path)
    84         # ... and additional pg clearance fields appear
     84        # ... and additional pg clearance fields appears
    8585        self.assertMatches('...Second Higher Education Record...',
    8686                           self.browser.contents)
     
    245245                           self.browser.contents)
    246246        self.browser.open(self.payments_path + '/addop')
    247         self.browser.getControl(name="form.p_category").value = ['clearance']
    248         self.browser.getControl("Create ticket").click()
    249         self.assertMatches('...ticket created...',
    250                            self.browser.contents)
     247        # We can't test clearance payment ticket creation at the moment,
     248        # since Uniben decided to deactivate clearance for ug students.
     249        #self.browser.getControl(name="form.p_category").value = ['clearance']
     250        #self.browser.getControl("Create ticket").click()
     251        #self.assertMatches('...ticket created...',
     252        #                   self.browser.contents)
    251253        self.browser.open(self.payments_path + '/addop')
    252254        self.browser.getControl(name="form.p_category").value = ['schoolfee']
Note: See TracChangeset for help on using the changeset viewer.