Changeset 10902 for main/waeup.uniben/trunk/src/waeup
- Timestamp:
- 13 Jan 2014, 11:06:33 (11 years ago)
- 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 144 144 145 145 # 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 InterswitchForm156 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) 172 172 173 173 # Create gown fee ticket … … 178 178 self.browser.getControl("Create ticket").click() 179 179 ctrl = self.browser.getControl(name='val_id') 180 value = ctrl.options[ 3]180 value = ctrl.options[2] 181 181 self.browser.getLink(value).click() 182 182 self.assertMatches( … … 205 205 self.browser.getControl("Create ticket").click() 206 206 ctrl = self.browser.getControl(name='val_id') 207 value = ctrl.options[ 4]207 value = ctrl.options[3] 208 208 self.browser.getLink(value).click() 209 209 self.assertMatches( … … 233 233 self.app['configuration'].addSessionConfiguration(configuration) 234 234 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 InterswitchForm247 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) 260 260 261 261 # Create balance payment ticket … … 267 267 self.browser.getControl("Create ticket").click() 268 268 ctrl = self.browser.getControl(name='val_id') 269 value = ctrl.options[ 6]269 value = ctrl.options[4] 270 270 self.browser.getLink(value).click() 271 271 self.assertMatches( -
main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py
r10836 r10902 82 82 self.certificate.study_mode = 'pg_ft' 83 83 self.browser.open(self.clearance_path) 84 # ... and additional pg clearance fields appear 84 # ... and additional pg clearance fields appears 85 85 self.assertMatches('...Second Higher Education Record...', 86 86 self.browser.contents) … … 245 245 self.browser.contents) 246 246 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) 251 253 self.browser.open(self.payments_path + '/addop') 252 254 self.browser.getControl(name="form.p_category").value = ['schoolfee']
Note: See TracChangeset for help on using the changeset viewer.