Changeset 12821 for main/waeup.ikoba


Ignore:
Timestamp:
24 Mar 2015, 08:57:25 (10 years ago)
Author:
uli
Message:

Add payment overview test, expect payment.title in payment pages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/payments/tests/test_browser.py

    r12777 r12821  
    4949        contract.product_options = [prodoption, ]
    5050
    51     def test_manage_payments(self):
    52 
     51    def test_overview_payments(self):
     52        # we can get a payments overview
    5353        self.add_product_option(self.contract)
    5454        self.setup_payment()
    55         # Managers can access the pages of payments section
    56         # and can remove payments
     55        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     56        self.browser.open('http://localhost/app/payments')
     57        self.browser.getControl("Find payment(s)").click()
     58        self.assertTrue('Empty search string' in self.browser.contents)
     59        self.browser.getControl(name="searchtype").value = ['payment_id']
     60        self.browser.getControl(
     61            name="searchterm").value = self.payment.payment_id
     62        self.browser.getControl("Find payment(s)").click()
     63        self.assertTrue(self.payment.title in self.browser.contents)
     64
     65    def test_manage_payments(self):
     66        # we can manage (at least: remove) payments as a manager
     67        self.add_product_option(self.contract)
     68        self.setup_payment()
    5769        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
    5870        self.browser.open('http://localhost/app')
     
    6981            name="searchterm").value = self.payment.payment_id
    7082        self.browser.getControl("Find payment(s)").click()
    71         self.assertTrue(
    72             '<a href="http://localhost/app/customers/K1000000/contracts/CON1">'
    73             in self.browser.contents)
    74         # Payments can be removed
     83        self.assertTrue(self.payment.title in self.browser.contents)
    7584        ctrl = self.browser.getControl(name='entries')
    7685        ctrl.getControl(value=self.payment.payment_id).selected = True
Note: See TracChangeset for help on using the changeset viewer.