Changeset 12690 for main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/customers/tests/test_browser.py
- Timestamp:
- 8 Mar 2015, 19:20:02 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/customers/tests/test_browser.py
r12689 r12690 1501 1501 contract.product_options = [prodoption,] 1502 1502 1503 def test_select_payment(self): 1504 # select payment 1503 def prepare_payment_select(self): 1505 1504 IWorkflowState(self.customer).setState('approved') 1506 1505 IWorkflowState(self.document).setState('verified') … … 1513 1512 self.browser.getControl(name="form.password").value = 'cpwd' 1514 1513 self.browser.getControl("Login").click() 1515 # go to our contract 1514 1515 def test_select_payment(self): 1516 # select payment 1517 self.prepare_payment_select() 1516 1518 self.browser.open('%s/CON1/edit' % self.contracts_path) 1517 1519 self.browser.getControl("Proceed to checkout").click() … … 1520 1522 self.assertTrue( 1521 1523 'Credit Card (Demo Payments)' in self.browser.contents) 1524 1525 def test_select_payment_no_choice(self): 1526 # we get warned if no payment was selected 1527 self.prepare_payment_select() 1528 never_ending_button_text = ( 1529 'Select payment method and proceed to payment gateway' 1530 ' (final submission)') 1531 self.browser.open( 1532 '%s/CON1/select_payment_method' % self.contracts_path) 1533 self.browser.getControl(never_ending_button_text).click() 1534 self.assertTrue( 1535 'Please pick a payment method' in self.browser.contents) 1536 1537 def test_select_payment_demo_provider(self): 1538 # we can proceed with payments if we select a payment method 1539 self.prepare_payment_select() 1540 never_ending_button_text = ( 1541 'Select payment method and proceed to payment gateway' 1542 ' (final submission)') 1543 self.browser.open( 1544 '%s/CON1/select_payment_method' % self.contracts_path) 1545 radio_ctrl = self.browser.getControl(name='gw') 1546 radio_ctrl.displayValue = ['Credit Card (Demo Payments)'] 1547 self.browser.getControl(never_ending_button_text).click() 1548 self.assertTrue( 1549 'Payment has been initiated.' in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.