Changeset 14208 for main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests
- Timestamp:
- 30 Sep 2016, 05:22:56 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py
r13806 r14208 141 141 self.customer['documents'].addDocument(self.document) 142 142 self.contract = createObject(self._contract_factory) 143 self.contract.contract_id = u'CON1' 143 self.contract.contract_id = u'11111222223333344444555556666677' 144 self.contract.title = u'My first contract' 144 145 self.assertRaises( 145 146 NotIdValue, setattr, self.contract, 'contract_id', … … 1352 1353 self.assertTrue('Sample Contract added.' in self.browser.contents) 1353 1354 conid = [i for i in self.customer['contracts'].keys() 1354 if len(i) > 10][0]1355 if self.customer['contracts'][i].title != 'My first contract'][0] 1355 1356 contract = self.customer['contracts'][conid] 1356 1357 self.assertEqual( … … 1446 1447 self.assertTrue('Sample Contract added.' in self.browser.contents) 1447 1448 conid = [i for i in self.customer['contracts'].keys() 1448 if len(i) > 10][0]1449 if self.customer['contracts'][i].title != 'My first contract'][0] 1449 1450 contract = self.customer['contracts'][conid] 1450 1451 self.assertEqual( … … 1567 1568 self.contract.valid_from = date(2015, 12, 4) 1568 1569 self.contract.valid_to = 'anything' 1569 self.contract.title = u'Contract Title' 1570 self.browser.open(self.customer_path + '/contracts/CON1') 1570 self.contract.title = u'My second contract' 1571 self.browser.open(self.customer_path 1572 + '/contracts/11111222223333344444555556666677') 1571 1573 self.browser.getLink("Download contract slip").click() 1572 1574 self.assertEqual(self.browser.headers['Status'], '200 Ok') … … 1583 1585 self.contract.document_object = self.document 1584 1586 self.contract.product_object = self.product 1585 self.contract.title = u' Contract Title'1587 self.contract.title = u'My third contract' 1586 1588 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 1587 1589 # Officers can open the receipt 1588 self.browser.open(self.customer_path + '/contracts/CON1') 1590 self.browser.open(self.customer_path 1591 + '/contracts/11111222223333344444555556666677') 1589 1592 self.browser.getLink("Download payment receipt").click() 1590 1593 self.assertEqual(self.browser.headers['Status'], '200 Ok') … … 1620 1623 IWorkflowState(self.contract).setState('submitted') 1621 1624 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 1622 self.browser.open(self.contracts_path + '/CON1/trigtrans') 1625 self.browser.open(self.contracts_path 1626 + '/11111222223333344444555556666677/trigtrans') 1623 1627 self.browser.getControl(name="transition").value = ['approve'] 1624 1628 self.browser.getControl("Apply").click() … … 1628 1632 'must be verified first.</div>' 1629 1633 in self.browser.contents) 1630 self.browser.open(self.contracts_path + '/CON1/trigtrans') 1634 self.browser.open(self.contracts_path 1635 + '/11111222223333344444555556666677/trigtrans') 1631 1636 IWorkflowState(self.document).setState('verified') 1632 1637 self.browser.getControl(name="transition").value = ['approve'] … … 1637 1642 # select payment 1638 1643 self.prepare_payment_select() 1639 self.browser.open('%s/CON1/edit' % self.contracts_path) 1644 self.browser.open('%s/11111222223333344444555556666677/edit' 1645 % self.contracts_path) 1640 1646 self.browser.getControl("Proceed to checkout").click() 1641 1647 self.assertTrue( … … 1648 1654 self.prepare_payment_select() 1649 1655 self.browser.open( 1650 '%s/CON1/select_payment_method' % self.contracts_path) 1656 '%s/11111222223333344444555556666677/select_payment_method' 1657 % self.contracts_path) 1651 1658 self.browser.getControl(self.never_ending_button_text).click() 1652 1659 self.assertTrue( … … 1657 1664 self.prepare_payment_select() 1658 1665 self.browser.open( 1659 '%s/CON1/select_payment_method' % self.contracts_path) 1666 '%s/11111222223333344444555556666677/select_payment_method' 1667 % self.contracts_path) 1660 1668 radio_ctrl = self.browser.getControl(name='gw') 1661 1669 radio_ctrl.displayValue = ['Credit Card (Demo Payments)']
Note: See TracChangeset for help on using the changeset viewer.